cx_Oracle execute procedure

Jerry Hill malaclypse2 at gmail.com
Wed Mar 19 11:23:18 EDT 2008


On Wed, Mar 19, 2008 at 11:03 AM, Poppy <znfmail-pythonlang at yahoo.com> wrote:
> I've been working on the code below and and executes silently, no
>  complaints, however the end result should be a record in my table and it's
>  not added. The procedure works with the passed credentials using SQLPlus or
>  SQL Developer clients. However I'm not sure if I'm constructing my python
>  code correctly to interact with Oracle.
...
>  connection.commit
>  cur.close
>  connection.close

You have to actually call these methods:
connection.commit()
cur.close()
connection.close()

Without the parentheses, you're just getting a reference to the
methods and immediately discarding them.

-- 
Jerry



More information about the Python-list mailing list