Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Python ODBC Inserting Blob field > 4096 Oracle 10g

Python ODBC Inserting Blob field > 4096 Oracle 10g

From: Godzilla <godzillaismad_at_gmail.com>
Date: 22 Mar 2007 00:52:15 -0700
Message-ID: <1174549934.955476.37560@l77g2000hsb.googlegroups.com>


Dear all,

I cannot find a solution for my problem with inserting a blob object
(>4000 in length) into an ORACLE database via ODBC.

I have tried the two ways of inserting the blob object (a zip file):

1)
fp = open("c:/test/test.zip", "r+b")
data = fp.read()
s = odbc.odbc(cs)
qry = s.cursor()
qry.execute("Insert into tBlob (data) values ('%s')" % data.encode('hex'))

return the error: Input String Too Long Limit: 4096

2)
qry.execute("Insert into tBlob (data) values (?)", data.encode('hex'))

does not return error, but it does not insert the record correctly.

Any help will be fully appreciated... Received on Thu Mar 22 2007 - 02:52:15 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US