Subject AW: [IBO] Re: Storing PDF into Firebird Blobs
Author Herbert Senner

I would store all these files in the same path, but with different file

(e.g. constructed by the key field(s) of your qryScan row, which would

uniquely identify the file and link it to the row).

You might have to check before writing the blob to a file if this concrete
file already
exists and then decide to delete it first and to create it newly (to
"reload") or not
to reread the blob's content and to view this existing file.


Von: [] Im Auftrag
von Terry Black
Gesendet: Dienstag, 22. Mai 2012 06:48
Betreff: AW: AW: [IBO] Re: Storing PDF into Firebird Blobs

Thanks, Herbert and Jason - the code works well. I can load PDF images into
blob fields. My intention is to just click on a record in a table and have
it display the contents of the blob which is a PDF. But I have a problem
with the Blob being saved to a file.

When I click on the first record
DM.qryScan.FieldByName('PDFIMAGE').SaveToFile(myPath + '\myPdf.pdf') the
first time it creates a file called myPDF.pdf when I click on the second
record I get an EFCreateError ' Cannot create file D:\apdf\mypdf.pdf' the
process cannot access the file because it is being used by another process.

In other words I need to write it to some temporary location.


[Non-text portions of this message have been removed]