Subject | Re: [firebird-support] Saving a BLOb? |
---|---|
Author | Bc. Jiri Cincura |
Post date | 2005-10-03T22:20:34Z |
Clay Shannon wrote:
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/
> Does anybody have a code snippet for saving a BLOb (Delphi)?Something like this should help you (I'm writing by heart, check it):
>
>
>
> 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.
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/