怎样将richedit的内容导入access的ole字段(50分)

  • 主题发起人 主题发起人 jsq
  • 开始时间 开始时间
J

jsq

Unregistered / Unconfirmed
GUEST, unregistred user!
请教:
如何将richedit中的内容存入ole字段中?
 
TBlobStream *Stream1;
Stream1 = new TBlobStream(able2->FieldByName("Remarks"), bmReadWrite);//Remarks为ole字段
Table2->Edit();
richedit->savetostream(Stream1);
Table2->Post();
delete Stream1;
 
richedit好象没有savetostream方法吧?
 
>>jsq
//richedit->savetostream(Stream1);
笔下误,是richedit->lines->savetostream(Stream1);
 
ok,那反过来呢?就是从ole读内容付给richedit
 
反过来更简单了
TBlobStream *Stream1;
Stream1 = new TBlobStream(able2->FieldByName("Remarks"), bmReadWrite);//Remarks为ole字段
richedit->lines->loadfromstream(Stream1);
delete Stream1;
好了,给分把
 
接受答案了.
 
后退
顶部