Hi
I'm inserting jpg's to blob field, everything seems to work properly, but blob content is malformed. Here's the sample code:
ZQuery1.SQL.Text := 'insert into PLATES (ID,'
+ ' PLATE_PIC)'
+ 'values (gen_id(GEN_PLATES, 1),'
+ ' :PLATE_PIC)';
Stream := TMemoryStream.Create;
try
Stream.LoadFromFile(ExtractFilePath(ParamStr(0)) + 'test.jpg');
ZQuery1.ParamByName('PLATE_PIC').LoadFromStream(Stream, ftBlob);
//ZQuery1.ParamByName('PLATE_PIC').SetBlobData(Stream.Memory, Stream.Size);
ZQuery1.ExecSQL;
finally
Stream.Free;
end;
Below printscreens with hex content of the file, and blob in db. Content differs more, not only first 4 bytes.
Firebird 2.5.2, charset utf8, PLATE_PIC is blob subtype binary.
Regards, Tomek