[Zope] images in access database

Terry Kerr terry@adroit.net
Fri, 02 Jun 2000 13:44:17 +1000


Hi,

I would like to be able to have gifs/jpgs stored in an MS access
database and then pull the out using zope and display them in rendered
documents.  I am completely new to access.  I have successfully
installed the ODBCDA into zope, and are able to connect to an access
database and pull ordinary text data out of tables.

I have created a table in access with a column of type 'OLE object' and
put a gif image in as data.  This is the only way I know how to get an
image into the table.  The problem I think with this is that it is a
link to the gif on the HDD, and doesn't actually have the data in the
table?  Anyway, when I pull the data out of the table from zope, access
puts a header and footer around the gif binary data, and hence a simple
<dtml-var blah> wont work to display the image.  Has anyone else every
pulled images from an access database.  Will I have to write a method to
strip the header and footer from the returned data before displaying the
gif?

terry.

--
-----------------------------
Terry Kerr (terry@adroit.net)
Adroit Internet Solutions
http://www.adroit.net/
03 9563 4461
0414 938 124