Re:how to Update JPEG to InterBase BLOB Field ?
I am sorry ! E-mail post again. (Text Mode)
I am use IBX update InterBase V6.01 for Windows open source version
myself writing new VCL Update JPEG to BLOB field and Display, this new VCL
use at BDE no problem, but using IBX update BLOB field show error message
"bitmap image is not valid" why ?
my New VCL source code:
var FJpeg: TJPEGImage;
FStream : TMemoryStream;
begin
FStream := TMemoryStream.Create;
try
if (Picture.Graphic is TBitmap) then
begin
FJpeg := TJPEGImage.Create;
try
FJpeg.Assign(Picture.Graphic);
FJpeg.SaveToStream(FStream);
// FJpeg.SaveToFile('\TEST.JPG'); // check is JPEG file format
if FDataLink.Field.IsBlob then
begin
FStream.Seek(soFromBeginning, 0);
TBlobField(FDataLink.Field).LoadFromStream(FStream); // this
line use IBX update error
end;
finally
FJpeg .Free;
end;
end else
FDataLink.Field.Clear;
finally
FStream.Free;
end;
end;