How to extract blob files in firebird?

2

I have in a table a field of type BLOB (BLOB SUB_TYPE 0 SEGMENT SIZE 80) where I store some binary files. I need to extract all the files stored in this table. Through IBExpert in the "Data / Form view" tab a field is displayed where I can right click on the "Save to file" option and save this file normally.

Now, I have thousands of records files should be extracted.

Is there any way for IBExpert or your IBEScript script tool where I can extract all these files at once? Is there any other tool I can do this?

Note: I even managed to extract these files through IBExpert's ibec_ExtractMetadata function, however, it extracts all the files from the table and a single file in Hexadecimal format, the extension of this file is .lob . I could not proceed to convert it to the binary file. Obs2 .: In the latter case I will create a program through Delphi to extract these files.

    
asked by anonymous 16.05.2014 / 20:36

2 answers

2

As far as I know, this is not possible for individual files. IBExpert has ways to export the blob files to an .lob file. But the idea is that they are used for import into another DB and not for individual use. See the following links: link link

But in this case you could also use FBExport: link

There is no automated way to export these files like this. Maybe you'd better write your own application in any language to do it.

    
23.05.2014 / 16:54
0

You can do the following, maybe it will help you ...

Run the following SQL in IBExpert:

select cast(*campo* as varchar(80))
from *tabela*
where *campo* is not null
After you have the values in text format, you can then export to a TXT, Excel, CSV file ... As you wish ...

    
07.06.2016 / 09:15