1

I have a table which has a BLOB field, this field is used to store xml files, now I want to find a way to load the information back to xml files (FileSystems).

Alec
  • 569
  • 2
  • 17
  • 27
  • 1
    I don't know Delphi, but I assume it will be the same (or similar) as in this question: http://stackoverflow.com/questions/13863169/load-and-save-image-from-blob-field-in-delphi-using-firebird – Mark Rotteveel Dec 10 '15 at 10:06

1 Answers1

3

First you select your data:

select xmlfile from myTable

When accessing it you simply cast the field to be a TBlobField:

  TBlobField(ADOQuery.FieldByName('XmlFile')).SaveToFile(myFileName);

Here I just used a AdoQuery as TDataset, but it can be anything else.

fantaghirocco
  • 4,761
  • 6
  • 38
  • 48
Jens Borrisholt
  • 6,174
  • 1
  • 33
  • 67