[DB-SIG] RE: Re: [DB-SIG] oracledb and LONG
Geir Ove Gronmo
grove@infotek.no
Fri, 18 Sep 1998 14:20:02 +0200
At 15:39 17.09.98 -0400, you wrote:
>The only way I know of to insert (or update) a LONG or LONG RAW column in
>Oracle is to use a bind variable. Oracle won't handle a string literal
longer
>than 2000 characters, regardless of the column data type.
>
>That is,
>
> sql = 'INSERT INTO TABLE_1 (COL_1) VALUES (:1)'
> cursor.execute(sql, (longVal, ))
Great!
This technique worked. I've tried using bind variables before, but
unsuccessfully. I didn't realize that the second parameter of the execute
method was supposed to be a tuple.
Thanks a lot!
Best regards,
Geir O.
================== Geir Ove Grønmo ==================
| STEP Infotek as, Gjerdrumsvei 12, 0486 Oslo, Norway |
| grove@infotek.no http://www.infotek.no/ |
-------------------------------------------------------