Subject Re: [firebird-support] Beginner needs help
Author Anderson Farias
Hi,

You've got to use some "programming" to archive this... for ex, in
Delphi/IBX you could use something like:

[OFFTOPIC] (sorry!)

with IBSQL1 do
begin
SQL.Text := 'insert into yourtable (blobfield) values (:blobparam)';
Transaction.StartTransaction;
try
ParamByName('blobparam').LoadFromFile('c:\anvil.gif');
ExecQuery;
finally
Transaction.Commit;
end;
end;


HTH,
Anderson Farias


----- Original Message -----
From: "john" <sta_john@...>
To: <firebird-support@yahoogroups.com>
Sent: Thursday, January 31, 2008 7:07 PM
Subject: [firebird-support] Beginner needs help


After trying to figure this out for while I've decided to swallow my
pride and post this. Please let me know if there's a different group
I should post this to.

I need to store an image to a to the DB and I can't seem to figure it
out. I'd like to use SQL directly in the SQL Editor if possible.

DB = Firebird 2.0 using SQL Hammer's (1.4.1 Community Edition) to run
SQL.
Field Type saving to = BLOB SUB_TYPE 0 SEGMENT SIZE 80
Image File Type = .gif
File Image Path = c:\anvil.gif

Saving the image to a directory and then saving the path to the DB is
not an option for this project.

Please advise if I can provide anymore information.

Again, I'm sorry for the simple question, but I just can't seem to
get the SQL syntax down right.

Thanks, - John