Is there a particular reason why you want to save the image _in_ the
database. Why not just save the name of the imagefile, its path, its width
and height etc. as text in an M$ Access database?
One advantage of that is that you can store a desciption (authorname, and
other info) together with the image entry.
You could then pull all of this out to create your own <dtml-var variable>
<dtml-in "sqlSelectAllImageFromAccess">
 <img src="<dtml-var path_field>/<dtml-var imagefile>" width="<dtml-var
width_field" etc...>

This can of course be made simpler and tweaked, maybe even through a Python

Again; if you definitly want to save it as an OLE in Access, discard.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Terry
Sent: 02 June 2000 04:44
Subject: [Zope] images in access database


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


Adroit Internet Solutions
03 9563 4461
0414 938 124

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - )

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to