Page 1 of 1

Issue with updating blob field

Posted: 28.03.2006, 15:24
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.

Posted: 28.03.2006, 20:13
by btrewern
I've had to use temporary files to get this to work.

Regards,

Ben