var
TempStream: TMemoryStream;
begin
//Read
TempStream := TMemoryStream.Create;
try
TBlobField(FieldByName('ImageField')).SaveToStream;
TempStream.Position := 0;
Memo1.Lines.LoadFromStream(TempStream);
Finally
TempStream.Free;
end;
//Write
TempStream := TMemoryStream.Create;
try
Memo1.Lines.SaveToStream(TempStream);
//Image1.Picture.Bitmap.LoadFromStream(TempStream);
TBlobField(FieldByName('ImageField')).LoadFromStream;
Finally
TempStream.Free;
end;
end;
珆尨芞砉腔謗跺源楊ㄩ
彆祥砑蚚dbimage饒繫艘艘狟醱腔源楊賸ㄐ
源楊珨ㄩ
var ms:Tmemorystream;
begin
ms:=tmemorystream.create;
:
TBlobfield(query.fieldbyname('image')).savetostream(ms);
ms.position:=0;
:
image1.picture.graphic.loadfromstream(ms);
ms.free;
end;
源楊媼ㄩ
if query.fieldbyname('image').isblob then
image1.picture.assign(query.fieldbyname('image'));
ps:彆踱囀奀jpg芞腔趕ㄛ婓uses 等啋囀樓奻jpeg等啋ㄛ奧珨隅猁婓image1奻啎珂溫离珨桲吽腔jpg芞ㄐ
仔細看看吧﹐應該有幫助的﹗