i have Oracle 8.1.6 ZOracleDA 2.2 installed with Zope 2.1.6 on a red hat
linux machine.

i have an oracle table with one column containing blobs. Now i have
the following problems:

1. How can i retrieve data from that table in zope or in python (syntax) ?

2. How can i insert data to that table ?
   i need the zope syntax something like:
        insert into blob_table values ('<dtml-var image>') ???
   or the python syntax 

i have written a little script:

import DCOracle, sys, os, DCOracle.dbi

dbc = DCOracle.Connect('mozdb_dba/mozdb_dba')
cur = dbc.cursor()
fn = open('test_img.jpg','rb')
data = fn.read()
param = DCOracle.dbi.dbiRaw(data)
cur.execute('select blobcol from blobtable')
dat = cur.fetchone()
print dat

when i try to execute it i get the following error:

Traceback (innermost last):
  File "blobtest.py", line 12, in ?
    dat = cur.fetchone()
  File "DCOracle/ociCurs.py", line 339, in fetchone
  File "DCOracle/ociCurs.py", line 109, in _error
    raise error, (rc, oci_.OracleErrorMessage(self._c.lda, rc))
oci.error: (24813, 'ORA-24813: cannot send or receive an unsupported

3. Is there a way to call a stored procedure or function that actually
   return values ? 
   i succeeded in retrieving one particular value out of a table but when
   i try a function like :
        select * from some_table
   i fail...

4. Changes.txt:

  Z Oracle DA Releases


    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.

  i don't know what this is referring to. where should i make this change?


 Alexander G. Schad (Programmer)    beehive elektronische medien gmbh
 mailto:[EMAIL PROTECTED]              mailto:[EMAIL PROTECTED]
                                    fon: (+49 30) 84 78 20
                                    fax: (+49 30) 84 78 22 99

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to