Re: [cx-oracle-users] cx-oracle-users Digest, Vol 64, Issue 3
Brought to you by:
atuining
From: Tamás G. <gt...@gt...> - 2011-10-09 11:55:45
|
Hi, > Date: Sun, 9 Oct 2011 11:42:13 +0000 > From: Wong Wah Meng-R32813 <r3...@fr...> > Subject: [cx-oracle-users] cursor.execute() then conn.commit however > SQL update not committed in database > To: "cx-...@li..." > <cx-...@li...> > Message-ID: > <02E...@03...> > > Content-Type: text/plain; charset="us-ascii" > > Hello there, > > I continue to work on my application migration from python 1.5.2 to 2.7.1, from using oracledb to cx_Oracle in a python RMI framework. > > I am troubleshooting this issue whereby my API is updating userLastName of a given userId. I am doing cursor.execute("update......") first then connection.commit(). However, the data in the database doesn't seem changed, which means the "commit" did not get through. There is no error generated when ".commit()" is executed though. > > I am thinking my API might be using different connection objects to do the cursor.execute() and connection.commit(), respectively however the likelihood is low, as the old code using oracledb was working well. > I'm sure this is the case. You should use cursor.connection.commit() for commiting, not the other connection object! Or put an "assert conn == cursor.commit" somewhere... GThomas |