Display PDF from SQL Server Image column

  • Thread starter Thread starter Y
  • Start date Start date
Y

Y

Greetings,

We have been storing PDF attachments in our SQL server database as
entries in an "Image" column (the replacement for blobs). We would
like to display these in Access 2007.

I have tried using the AcroPDF ocx control that comes with Acrobat.
It has an "src" property that allows me to successfully display a pdf
located on the hard drive. However, our PDFs are stored as binary
objects in a sql server database. The following do not work:

Me.AcroPDF0.ControlSource = Me.AttachmentData 'Nope
....
Me.AcroPDF0.src = Me.AttachmentData 'Nope
...
Me.AcroPDF0.Object = Me.AttachmentData 'Nope
....
Me.AcroPDF0.value = Me.AttachmentData 'Nope
....
Me.AcroPDF0= Me.AttachmentData 'Nope

Me.AcroPDF0.src = "C:\test.pdf" 'Works, but not what we want.

Any help would be appreciated.

Y.
 
You may want to check with Adobe, since it's their control.

Alternatively, you may have to unload the binary objects to file in order to
read them.
 
You may want to check with Adobe, since it's their control.

Alternatively, you may have to unload the binary objects to file in orderto
read them.

Thanks Doug.

I'll check with Adobe. Right now I have a system where it writes the
PDF to a preset temp file on the user's hard drive ("C:\AppTemp.pdf"),
and then displays this in the control. It works, but I'm sure there
will be issues with access to the root directory on the system
volume. Oh well....
 
Back
Top