Re: [Tutor] SQLite error messages

2010-03-10 Thread Sander Sweers
On 10 March 2010 21:02, Alan Harris-Reid wrote: > Maybe I have misunderstood you, but I always thought that the 'finally' > section was run even if the 'try' section is successful, in which case I > would not want a rollback. I was thinking something like this. import sqlite3 con = sqlite3.conne

Re: [Tutor] SQLite error messages

2010-03-10 Thread Alan Harris-Reid
Sander Sweers wrote: - Original message - 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 ("

Re: [Tutor] SQLite error messages

2010-03-10 Thread Alan Harris-Reid
Benno Lang wrote: On 10 March 2010 11:37, Alan Harris-Reid wrote: 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

Re: [Tutor] SQLite error messages

2010-03-09 Thread Sander Sweers
- Original message - > 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")')

Re: [Tutor] SQLite error messages

2010-03-09 Thread Benno Lang
On 10 March 2010 11:37, Alan Harris-Reid wrote: > 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_

[Tutor] SQLite error messages

2010-03-09 Thread Alan Harris-Reid
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.ro