On 16 Oct 2012, at 9:33am, Daniel Polski <dan...@agelektronik.se> wrote:
> What confuses me is that the "BEGIN IMMEDIATE TRANSACTION" sometimes fails > with a SQLITE_BUSY[5] (database is locked) after some iterations in the loop > even though all previous actions so far has returned SQLITE_OK. All > subsequent calls I do to try to begin the transaction again also fails. Any > ideas how that can happen? Nothing obvious springs to mind but I do see that you are not checking the values returned by most of your sqlite_exec() calls. Perhaps you could write a little routine that does the sqlite_exec() and then asserts that the value returned is SQLITE_OK. It may be that it's actually one of the other calls which is getting the first indication of error. Apart from that, and the fact that you don't need the semicolons everywhere, I don't see anything bad about your code. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users