Subject Re: [firebird-support] Insert into DAtabase from BLOB file
Author Milan Babuskov
Sándor Tamás wrote:
> I mean, if I extract datas from a table with some program, it stores the
> datas in a text-like file, and another binary file to store binary (blod)
> datas. But what,if I have some pictures, and I want to insert them into a
> database. How shall I make this binary file, and how can I find those IDs?

You can use FBExport. It extracts all data you request into a single binary
.fbx file. Of course, you can separately extract non-blob data as insert
statements, and use blob file to update. Some thing like:

Exporting:
fbexport -Si -Q "select all, non, blob, columns from table" -F insert.sql
fbexport -S -Q "select all, blob, columns from table" -F blobs.fbx

Importing:
isql -i insert.sql
fbexport -Su -Q "update table set blob1=:1, blob2=:2, etc." -F blobs.fbx

:1, :2, etc. are ordinal numbers, in the same order as fields in "select all,
blob, columns..." above.

--
Milan Babuskov
http://fbexport.sourceforge.net