J
jacknes111
Unregistered / Unconfirmed
GUEST, unregistred user!
用dephi或c++bulid
怎样从ACCESS中读取MEMO中的数据(uncoide编码)再存储到另一个表中同样是Memo属性
我自己写进去是乱码,
我的代码如下
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; i<data->RecordCount; 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!"
望各位大虾们帮个忙谢谢!!!!!!!!!!
数据我可以提供(留个邮箱)先谢谢各位了
怎样从ACCESS中读取MEMO中的数据(uncoide编码)再存储到另一个表中同样是Memo属性
我自己写进去是乱码,
我的代码如下
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; i<data->RecordCount; 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!"
望各位大虾们帮个忙谢谢!!!!!!!!!!
数据我可以提供(留个邮箱)先谢谢各位了