Subject TBlobField problem
Author Tilo Muetze
Hello,
sorry if this question is too dumb but it seems I cannot find a solution:
I'm trying to save a jpg image to a BLOB column with this code:

var
strJPG: TStream;
imgJPG: TJpegImage;
begin
try
strJPG :=
ibqryPicture.CreateBlobStream(ibqryPicture.FieldByName('PICTURE'),
bmReadWrite);
imgJPG := TJpegImage.Create;
imgJPG.LoadFromFile(sFileName);
imgJPG.SaveToStream(strJPG);
ibqryPicture.Edit;
TBlobField(ibqryPicture.FieldByName('PICTURE')).LoadFromStream(strJPG);
ibqryPicture.Post;
finally
strJPG.Free;
imgJPG.Free;
end;
end;

'ibqryPicture' is a TIBOQuery
'sFileName' is a string variable which holds the complete filename to the
jpg file

The code seems really simple but after posting ibqryPicture the Field
'PICTURE' is still null. Do you see any reason for that?

We use: D6 Pro, IBO 4.2 Eg with TIBOx components

Regards,
Tilo Muetze