I have following problem. I am trying to convert an application which currently using BDE to SDAC 3.80 components (demo version). If I get this running we will buy them.
I have further used a BDE TQuery to retrieve the Picture.
Code: Select all
lBlobStream := TBlobStream.Create(TBlobField(FieldByName('FLAG')),
bmREAD);
try
lBitMap := Graphics.TBitMap.Create;
lBitMap .PixelFormat := pf4bit;
lBitMap .TransparentMode := tmAuto;
lBitMap .Transparent := true;
lBitmap.LoadFromStream(lBlobStream);
finally
lBlobStream.Free;
end;
I modified the code to following
Code: Select all
lStream := TMemoryStream.Create;
try
TBlob(FieldByName('FLAG')).SaveToStream(lStream);
lBitMap := Graphics.TBitMap.Create;
lBitMap .PixelFormat := pf4bit;
lBitMap .TransparentMode := tmAuto;
lBitMap .Transparent := true;
lBitmap.LoadFromStream(lStream);
finally
lStream.Free;
end;
I use an SQL Server 2000 and the fieldtype in the database is of type image.
If someone help me with a hint, it would be very good for me.