Subject Inserting GIF into database field
Author junior
Hi,

How could I insert a GIF file into the database field? I tried to save with:

procedure TCSAppData.InsertImageIntoField(FieldName: TParam;
Image: TImage);
var
TempStream: TMemoryStream;
begin
TempStream := TMemoryStream.Create;
try
Image.Picture.Graphic.SaveToStream(TempStream);
TempStream.Position := 0;
FieldName.LoadFromStream(TempStream, ftBlob);
finally
FreeAndNil(TempStream);
end;
end;

But when I try to view the record with my app or IBConsole, then there will be an exception saying:

"Bitmap image is not valid";

The above routine works fine for normal BMP file.

Thanks in advance.

Best wishes,
jr


[Non-text portions of this message have been removed]