Nicholas Bastin wrote: > When trying to commit a transaction, I'm getting the following error > message from sqlite3_exec(): > > "cannot commit transaction - SQL statements in progress" > > Is there any way to find out what statements are in progress? Also, > what could cause this? I can guarantee that sqlite3_step has returned > SQLITE_DONE on all my statements before I get to this point. Is that > not sufficient? > > (Is it better to compile a statement that says COMMIT and use > sqlite3_step, rather than sqlite3_exec ("COMMIT")? ) > > -- > Nick > > I found out yesterday, that if you have an open count(*) statement, and fail to finalise it before doing an insert/update commit, then you get this error code. This may help a little? (only seemed to be on count(*) statements, other normal select statements, didn't seem to affect this).
-- Bill King, Software Engineer Trolltech, Brisbane Technology Park 26 Brandl St, Eight Mile Plains, QLD, Australia, 4113 Tel + 61 7 3219 9906 (x137) Fax + 61 7 3219 9938 mobile: 0423 532 733