newb: Creating Exception
johnny
rampeters at gmail.com
Mon Dec 11 19:02:02 EST 2006
I want to print individual exception for database connection, sql
execution, database closing, closing the cursor. Can I do it with one
try..catch or I need a nested try...catch?
conn = adodb.NewADOConnection('mysql')
conn.Connect('localhost', 'temp', 'temp', 'temp')
sql = r"update file set pdf_file_path='" +finalFile+r"' where
file_path='"+p+r"'"
cursor = conn.Execute(sql)
rows = cursor.Affected_Rows()
cursor.close()
conn.close()
Thank you for your FOUNTAIN OF WISDOM...
More information about the Python-list
mailing list