Hi all, we're (quite happily) running Zope and DB2 (via SQLRelay) on several Linux boxes. Currently, we are trying to put large chunks of data into DB2 BLOBs and serve them via Zope. Someone suggested just using a ZSQLMethod for selecting the respective field and <dtml-var> to display it, making sure the Content-Type is correct. I tried to reproduce that solution, using an ZSQLMethod and DTML as follows: SQL Method testselect: select data from blobtest where id = 42 DTML: <dtml-in testselect> <dtml-var data> </dtml-in> All I see is a textual representation of my data in hexadecimal. A common recommendation I saw (relating to Oracle, MySQL or PostgreSQL) was to treat this issue in Python scripts. Has anyone accomplished any way of serving BLOBs from Zope in a simple fashion as shown above (or in any way at all) using DB2 and SQLRelay? I'd really like to avoid hacking database specific Python scripts... Thanks in advance, Christoph
Christoph Schmitz writes:
... I tried to reproduce that solution, using an ZSQLMethod and DTML as follows:
SQL Method testselect: select data from blobtest where id = 42
DTML: <dtml-in testselect> <dtml-var data> </dtml-in>
All I see is a textual representation of my data in hexadecimal. That is almost what one can expect...
What would you like to get? Dieter
Do this... http://www.zope.org/Members/peterb/oracle_lobs I had to change this in the example return lob.read() to return lob ----- Original Message ----- From: "Dieter Maurer" <dieter@handshake.de> To: "Christoph Schmitz" <cschm@gmx.de> Cc: <zope@zope.org> Sent: Friday, November 08, 2002 4:55 PM Subject: Re: [Zope] Zope/DB2/SQLRelay and BLOBs
Christoph Schmitz writes:
... I tried to reproduce that solution, using an ZSQLMethod and DTML as follows:
SQL Method testselect: select data from blobtest where id = 42
DTML: <dtml-in testselect> <dtml-var data> </dtml-in>
All I see is a textual representation of my data in hexadecimal. That is almost what one can expect...
What would you like to get?
Dieter
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (3)
-
Christoph Schmitz -
Dieter Maurer -
working4aliving