cx_Oracle and output variables

Posted by Tim on Stack Overflow See other posts from Stack Overflow or by Tim
Published on 2010-04-23T11:09:04Z Indexed on 2010/04/23 11:13 UTC
Read the original article Hit count: 284

Filed under:
|
|

I'm trying to do this again an Oracle 10 database:

cursor = connection.cursor()
lOutput = cursor.var(cx_Oracle.STRING)
cursor.execute("""
            BEGIN
                %(out)s := 'N';
            END;""",
            {'out' : lOutput})
print lOutput.value

but I'm getting

DatabaseError: ORA-01036: illegal variable name/number

Is it possible to define PL/SQL blocks in cx_Oracle this way?

© Stack Overflow or respective owner

Related posts about cx-oracle

Related posts about python