[Tutor] updating Oracle tables via python

Williams, Thomas WilliTf at dshs.wa.gov
Wed Mar 30 01:16:41 CEST 2005


Greetings,

I am attempting to update an Oracle table using python.  When I execute the
code, the python script appears to hang, in that nothing else happens.

 

As always, any assistance you can provide will be appreciated.

 

Code:

 

connection = cx_Oracle.connect("db/password at dbname")

cursor = connection.cursor()

strUpdate = " UPDATE table SET firstname = 'JOSEPH'  WHERE lastname =
'SMITH' "

cursor.execute(strUpdate)

cursor.close()

connection.close()

 

 

Tom Williams
DSHS - Research and Data Analysis Division 
14th and Jefferson, MS: 45204 
Olympia, WA  98504-5204 
360.902.0764

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20050329/d8e1add7/attachment.htm


More information about the Tutor mailing list