Subject Re: [firebird-support] Saving a BLOb?
Author Bc. Jiri Cincura
Clay Shannon wrote:
> Does anybody have a code snippet for saving a BLOb (Delphi)?
>
>
>
> After allowing the user to modify an image by drawing one or more circles on
> it, I want to save the modified image as a BLOb.

Something like this should help you (I'm writing by heart, check it):

IBQueryTmp.SQL.Clear;
IBQueryTmp.SQL.Add('INSERT INTO table');
IBQueryTmp.SQL.Add('(img) VALUES (:img)');
IBQueryTmp.Params[0].DataType := ftBLOB;
IBQueryTmp.Params[0].Value := Null;
IBQueryTmp.Params[0].LoadFromFile(ImagePath, ftBlob);
if not(IBQueryTmp.Prepared) then
IBQueryTmp.Prepare;
IBQueryTmp.ExecSQL;


--
Bc. Jiri Cincura
http://www.ID3renamer.com/
http://www.x2develop.com/
ICQ: 314711544 | Yahoo!: x2develop
http://photo.cincura.net/