Subject AW: AW: [IBO] Re: Storing PDF into Firebird Blobs
Author Terry Black
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.


IT Manager | Public Health Unit Hornsby | Health Reform Transitional Organisation Northern
Hornsby Hospital, Main Building 1, 36-76 Palmerston Road, Hornsby NSW 2077
Tel. 02 9477 9400 | Fax. 02 9482 1650 | tblac@...

>>> "Herbert Senner" <hsenner@...> 22/05/2012 3:29 am >>>
Of course you're right, Jason.

It's straight forward to use these built-in IBO procedures when writing to
and reading from files.

In former times when I wrote my functions I was not aware of
them and had knowledge only about the TIB_BlobStream.CreateForColumn
and I had to help myself with this loop way.

So, Terry, the code for reading the pdf would be:

DM.qryScan.FieldByName('PDFIMAGE').LoadFromFile(myPath + '\myPdf.pdf')

and for writing to a file:

DM.qryScan.FieldByName('PDFIMAGE').SaveToFile(myPath + '\myPdf.pdf')


Von: [] Im Auftrag
von IBO Support List
Gesendet: Montag, 21. Mai 2012 17:17
Betreff: RE: AW: [IBO] Re: Storing PDF into Firebird Blobs

What's the problem with TIB_Column.LoadFromFile() and

Seems to me you are way over-complicating things.


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

Disclaimer: This message is intended for the addressee named and may contain confidential information. If you are not the intended recipient, please delete it and notify the sender.

Views expressed in this message are those of the individual sender, and are not necessarily the views of the Local Health District or associated entities.