A
aijiaxin
Unregistered / Unconfirmed
GUEST, unregistred user!
我的问题是:数据库中的数据输入到word中,下面的代码可以实现,但是下面的只能显示一条数据
我想把所有的数据都要输入到word中,怎么办?高手指点一下啊
下面是的我源代码:
var
MemoStream:TMemoryStream;
Blob:TStream;
begin
if ADOQuery1.FieldByName('内容').IsNull then
begin
Exit;
end;
Screen.Cursor := crHourGlass;
MemoStream := TMemoryStream.Create;
try
MemoStream.Seek(0,soFromBeginning);
Blob := ADOQuery1.CreateBlobStream(ADOQuery1.FieldByName('内容'),bmRead);
try
Blob.Seek(0,soFromBeginning);
MemoStream.CopyFrom(Blob,Blob.Size);
MemoStream.SaveToFile('c:/test.rtf');
finally
Blob.Free;
end;
finally
MemoStream.Free;
Screen.Cursor:=crDefault;
end;
end;
我想把所有的数据都要输入到word中,怎么办?高手指点一下啊
下面是的我源代码:
var
MemoStream:TMemoryStream;
Blob:TStream;
begin
if ADOQuery1.FieldByName('内容').IsNull then
begin
Exit;
end;
Screen.Cursor := crHourGlass;
MemoStream := TMemoryStream.Create;
try
MemoStream.Seek(0,soFromBeginning);
Blob := ADOQuery1.CreateBlobStream(ADOQuery1.FieldByName('内容'),bmRead);
try
Blob.Seek(0,soFromBeginning);
MemoStream.CopyFrom(Blob,Blob.Size);
MemoStream.SaveToFile('c:/test.rtf');
finally
Blob.Free;
end;
finally
MemoStream.Free;
Screen.Cursor:=crDefault;
end;
end;