M
monkeyboys
Unregistered / Unconfirmed
GUEST, unregistred user!
急于求助!
var
ss:string;
tempstream:tmemorystream;
begin
TempStream := TMemoryStream.Create;
query2.close;
query2.sql.clear;
ss:='select * from icon_bmp where code=''%s'' ';
ss:=format(ss,[query1.fieldbyname('code').asstring]);
query2.sql.add(ss);
query2.open;
try
TBlobField(query2.FieldByName('memo')).SaveToStream(TempStream);
TempStream.Position := 0;
image1.Picture.Graphic.Assign(TPersistent(TempStream));
finally
TempStream.Free;
end;
运行时报错:invalid field type
其中memo为BLOB类型,那么请问我如何在
TBlobField(query2.FieldByName('memo')).SaveToStream(TempStream);
这里得到blob的值?
var
ss:string;
tempstream:tmemorystream;
begin
TempStream := TMemoryStream.Create;
query2.close;
query2.sql.clear;
ss:='select * from icon_bmp where code=''%s'' ';
ss:=format(ss,[query1.fieldbyname('code').asstring]);
query2.sql.add(ss);
query2.open;
try
TBlobField(query2.FieldByName('memo')).SaveToStream(TempStream);
TempStream.Position := 0;
image1.Picture.Graphic.Assign(TPersistent(TempStream));
finally
TempStream.Free;
end;
运行时报错:invalid field type
其中memo为BLOB类型,那么请问我如何在
TBlobField(query2.FieldByName('memo')).SaveToStream(TempStream);
这里得到blob的值?