On Wed, May 18, 2005 at 09:41:39PM +0200, F. GEIGER wrote: > I've troubles to let my app take off using pysqlite. > > What I wonder most for now is that "pysqlite2.dbapi2.OperationalError: > cannot commit transaction - SQL statements in progress" when I do this: >
Urgh! I would have preferred simplified demo code. But after a little thinking, I guessed right. > [...] pysqlite 2 currently has problems doing .commit() .rollback() on the connection object after a cur.execute("select ...") in a few cases. I know why and I will fix it in 2.0.2 (originally only MacOS X fixes planned) or if it takes longer to test, in 2.0.3. Current workarounds: - don't commit/rollback after SELECT. It doesn't make much sense anyway. .commit()/.rollback() after your DML statements instead (INSERT/UPDATE/DELETE). - Use fetchall()[0] for fetching single rows instead of fetchone() for queries like your SELECT COUNT. -- Gerhard -- Gerhard Häring - [EMAIL PROTECTED] - Python, web & database development
signature.asc
Description: Digital signature
-- http://mail.python.org/mailman/listinfo/python-list