Error in inserting blob into ORACLE using ODBC.Windows

TM tanming_fong at phoenix.com
Tue Jan 4 11:54:16 EST 2000


Thanx for the leads. I still haven't got a clue of what went wrong, but
here are findings:

Oracle docs says,
"ORA-01461: can bind a LONG value only for insert into a LONG column" - 
Cause: An attempt was made to insert a value from a LONG datatype into
another datatype. This is not allowed. 
Action: Do not try to insert LONG datatypes into other types of columns

The mxODBC test.py run into this problem. i went panic yesterday because of
a looming deadline and threw in some VB(guilty as charged) +ASP ADO code,
the Oracle ODBC driver gave me the same ORA-01461 complaint, and the
MS ODBC driver just got all confused. 

Oracle docs also says,
"ORA-01465: invalid hex numbe" - 
Cause: In an UPDATE statement following a SELECT FOR UPDATE, part of the
ROWID contains invalid characters. ROWID must be expressed in the proper
and expected format for ROWID and within quotes. 
Action: Enter the ROWID just as it was returned in the SELECT FOR UPDATE. 

This is the error I get with the python code. Later on I did try to open
the file in 'rb' mode as bjorn suggested, but still the same thing. BTW,
"print conn.bindmethod" returns a 1, so i must be using BIND_USING_SQLTYPE,
which is what i want, i hope.

Since i got stuck with mxODBC+python  then ADO and my  deadline is two
weeks away, i will surrender and and redirect that part of the web page to
some pieces of Java JDBC code which one my colleagues claimed he saw
working with Oracle BLOB. 

thanks for all the help,

Tanming Fong






More information about the Python-list mailing list