L
lzh1998
Unregistered / Unconfirmed
GUEST, unregistred user!
通过:OleContainer 把WORD 从数据库读/存储 都出错.分数不够可以加.
Oleword 是不是TOleContainer 组件
读:
var Stream: TStream;
begin
ADOConnection1.Open;
qword.Open;
Stream:=qword.CreateBlobStream(qwordINFO, bmRead);
Stream.position :=0 ;
Oleword.LoadFromStream(stream); 出现错误:stream read error!
stream.Free;
end;
存储:
var stream:TBlobStream;
begin
if Oleword.OleObject.Application.ActiveDocument.Saved then
ShowMessage(pchar('aaaaaaaa'))
else
begin
qword.open;
qword.Append;
Stream:=TBlobStream.Create(qwordINFO, bmWrite);
Oleword.SaveToStream(stream);//出现错误:Invalid class typecast!
qword.Post;
stream.Free ;
end;
我在网上找了半天,没有解决的方法.TOleContainer 近来才用.大家帮帮忙
Oleword 是不是TOleContainer 组件
读:
var Stream: TStream;
begin
ADOConnection1.Open;
qword.Open;
Stream:=qword.CreateBlobStream(qwordINFO, bmRead);
Stream.position :=0 ;
Oleword.LoadFromStream(stream); 出现错误:stream read error!
stream.Free;
end;
存储:
var stream:TBlobStream;
begin
if Oleword.OleObject.Application.ActiveDocument.Saved then
ShowMessage(pchar('aaaaaaaa'))
else
begin
qword.open;
qword.Append;
Stream:=TBlobStream.Create(qwordINFO, bmWrite);
Oleword.SaveToStream(stream);//出现错误:Invalid class typecast!
qword.Post;
stream.Free ;
end;
我在网上找了半天,没有解决的方法.TOleContainer 近来才用.大家帮帮忙