Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2341698
  • 博文数量: 816
  • 博客积分: 10000
  • 博客等级: 上将
  • 技术积分: 5010
  • 用 户 组: 普通用户
  • 注册时间: 2008-12-17 17:57
文章分类

全部博文(816)

文章存档

2011年(1)

2008年(815)

分类:

2008-12-17 18:05:38

用dephi或c++bulid
怎样从ACCESS中读取MEMO中的数据(unicode编码)再存储到另一个表中同样是Memo属性

我自己写进去是乱码,用TNT控件,数据显示的是?
我的代码如下
data->Close();
        data->SQL->Clear();
        data->SQL->Text = "delete * from result_israel";
        data->ExecSQL();

        data->Close();
        data->SQL->Clear();
        data->SQL->Text = "select * from dictionary_israel where jiexi<>'' order by id";//解释 is not null order by id";
        data->Open();
        ProgressBar1->Max = data->RecordCount;
        ProgressBar1->Min = 0;

        for(int i=0; iRecordCount; i++)
        {
          WideString jieshi,tempstr, kong = "\r\n";
          WideString word = data->FieldByName("Word")->Value;
          WideString datastr = data->FieldByName("jiexi")->Value;

          int pos;
          pos = datastr.Pos("\n");
          if(pos == 0)
          {
          data->Next();
          ProgressBar1->Position += 1;
          continue;
          }
          tempstr = datastr.SubString(1,pos - 2);
          if(tempstr != word)
          {
          data->Next();
          ProgressBar1->Position += 1;
          continue;
          }
          jieshi = datastr.SubString(pos + 1,datastr.Length() - pos);
          write->Close();
          write->SQL->Text = "insert into result_israel (Word,jiexi) values (:a, :b)";
          write->Parameters->Items[0]->Value = word;
          write->Parameters->Items[1]->Value = jieshi;
          write->ExecSQL();

          ProgressBar1->Position += 1;
          data->Next();
        }
        ShowMessage("ok!");
望各位大虾们帮个忙谢谢!!!!!!!!!!
数据:留个邮箱我发邮件给你们,先谢谢你们了

--------------------next---------------------

阅读(980) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~