I've never done it, and it's not well-documented (ie. I have no idea if it really works), but I believe the Oracle DA can retrieve BLOBS... Here the CHANGES.txt file from ZOracleDA: Z Oracle DA Releases 2.2.0 Added a small feature that allows you to access LOBs in the Oracle database. To do this, you must have your maximum number of results set to '1'. Otherwise, it won't work. In addition, several bugs were resolved. 2.1.0 Based on DCOracle new release that fixes many outstanding bugs. In addition, it is now integrated with the Zope2 transaction system. 2.0.0 This is the first version of the database adapter using DCOracle for Zope. This database adapter is based on an earlier database adapter for Principia, which is why this is revision 2. chas wrote:
I've got 8000 photos (jpeg format) stored in an Oracle database. The table that contains the photos has these columns which are of interest :
PICTURE LONG RAW PICTURE_LENGTH NOT NULL NUMBER(14)
My goals in order of progression are :
1. Extract the image from the database using ZSQL methods
2. Serve that image up directly to the web browser
3. Save the image to the filesystem or, even better, create a Zope Image Object
Unfortunately, I'm stuck at step 1. Doing a request on the database with ZSQL methods is returning :
Error, oci.error: (911, 'ORA-00911: invalid character\012')
Is there any way for Zope to handle this or is this going to involve python-DCOracle scripts instead and then uploading into Zope ?
Thank you very much in advance,
chas
_______________________________________________ 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 )
-- Chris McDonough Digital Creations, Inc. Zope - http://www.zope.org