I am running an END TRANSACTION on my database and occasionally I get error
#1 that “cannot commit – no transaction is active”
Is there a way to determine if a transaction is active before trying a commit? I have been tracking my "BEGIN TRANSACTIONS" by hand but I feel there is a better way.
I am using the C API
You might want to check this:
http://www.sqlite.org/c3ref/get_autocommit.html
According to the page, if you are in a transaction,
sqlite3_get_autocommit()will return 0.