Hi there,
I am using the sqlite3 module with Python 3.1, and have some code which
goes something like as follows...
import sqlite3
con = sqlite3.connect('MyDatabase.db')
try:
execresult = con.execute('INSERT INTO MyTable (field_name) VALUES
("MyValue")')
con.commit()
except:
con.rollback()
If con.execute() fails, nothing is returned, and although the code
correctly executes the rollback next, I have no idea why, and therefore
cannot create a suitable error-handler with meaningful messages.
I notice from the SQLite website that there are error codes, but it
looks like the sqlite3 module is not reporting them.
Has anyone any ideas how to get around this problem?
TIA,
Alan Harris-Reid
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor