[DB-SIG] DCOracle / BLOB

Sebastian Schneckener schneckener@lion-ag.de
Thu, 15 Jul 1999 18:27:30 +0200


Hello everybody

I am trying to store images as BLOB in an oracle database using the DCOracle interface.
I found out, that if I use a statement like:

cursor.execute ("INSERT INTO  images values (1,1,1,'X',:p1)",(image,))

the image has to be in a hex format.
So far, so easy, but if the image is larger than 4000 byte, I get a problem:

  File "/software/pub_gen/lib/python1.5/site-packages/DCOracle/ociCurs.py", line 225, in execute
    if rc!=3129: self._error()
  File "/software/pub_gen/lib/python1.5/site-packages/DCOracle/ociCurs.py", line 81, in _error
    raise error, (rc, oci_.OracleErrorMessage(self._c.lda, rc))
oci.error: (1461, 'ORA-01461: can bind a LONG value only for insert into a LONG column\012')

Neither I realy understand this nor I know a workaround. The column type in images is BLOB of course.
Anybody any ideas?
    Thanks
        Sebastian