On Mon, Nov 9, 2015 at 8:44 AM, Cecil Westerhof <ce...@decebal.nl> wrote: > I have written some code I like to use with several databases. At the > moment sqlite and postgres. It looks like with progres I can use: > cursor.execute('COMMIT;') > but that with sqlite I need to use: > conn.commit() > > Is this true, or am I doing something wrong? > > When I use > cursor.execute('COMMIT;') > with sqlite, I get: > sqlite3.OperationalError: cannot commit - no transaction is active > While > conn.commit() > does what it should do. > > Before I do my statements I use: > cursor.execute(BEGIN TRANSACTION;')
This looks like it answers your question: http://stackoverflow.com/questions/9773200/python-sqlite3-cannot-commit-no-transaction-is-active -- https://mail.python.org/mailman/listinfo/python-list