Issue with updating blob field

Forum related to version 6.1.5 of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
Christer Bach
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: 28.03.2006, 15:12

Issue with updating blob field

Post by Christer Bach »

Hi,

I have used zeolibs for a couple of years now and it works very well. I use it to connect with our sql-servers and have never had any problems before now...

I have created a new database with a table that contains an Image field called Picture. I have tried a lot of ways to get this field updated, but somehow it never does. Does anyone have any idea of way? Other fields updates just fine except this one. Here`s what I have done that doesn`t update the field...

var
imStream:TStream;
begin
sqlQuery.SQL.Text:='SELECT * FROM ModelTypes WHERE IndexID = '+IntToStr(ID);
with dsSQL.Dataset do
begin
Edit;
imStream := CreateBlobStream(FieldByName('Picture'),bmWrite);
Image1.Picture.Bitmap.SaveToStream(imStream);
Post;
end;
end;

I recieve no errors during this operation. It just doesn`t update it... I also updates other fields in the same code that updates fine.
btrewern
Expert Boarder
Expert Boarder
Posts: 193
Joined: 06.10.2005, 18:51

Post by btrewern »

I've had to use temporary files to get this to work.

Regards,

Ben
Post Reply