Forum Stats

  • 3,769,900 Users
  • 2,253,029 Discussions
  • 7,875,233 Comments

Discussions

Update Oracle 11 g - cx_Oracle

3172122
3172122 Member Posts: 8
edited Apr 16, 2016 5:50PM in Python

I have a problem with the update process of Orace DB (with Python), with this code:

cur = con.cursor()

query = "UPDATE finmodel.stock SET payout = :var1 WHERE Code = :var2"

cur.execute(query, {'var1': Payout, 'var2': ArrayCode[z]})

(payout is a number, arrayCode[z] is a string)

the program works well (no error) but the updating of the DB doesn't work...

I have tried to run the same SQL statement inside the DB Oracle (SQL environment of 11g Oracle) and the query works perfectly, then it is correct...(obviously I have change :var1 and :var2 with the variable value)

Where is the error?

Thanks!

Answers

This discussion has been closed.