Hello,
I had a similar experience, but there was too much code to create a simple bug report. Surprisingly, the error disappeared if I first made a "SELECT FROM table" before the "INSERT INTO table" on the same table.
Also the error description "database TABLE is locked" is sometimes wrong because it is the whole database which is locked. Perhaps another error code/message should be created for "database is locked" (e.g. with open cursors).
Jakub
Marcel Strittmatter wrote:
Hi all
When I try to insert data into a table, sqlite3 responses with SQLITE_ERROR and the error message: "database table is locked". I searched already for unfinalized statements but couln't find any. The insert statement is not executed while a query is active...
The problem exists only on Windows (local storage), on Linux everything (except known nfs problems) works well (same code).
My question: Is there a "easy" way to test if a table is locked? Are there other possibilities to help debug such a problem (I already tried sqlit3_trace, but this doesn't help much because I don't see if a query is finalized or not).
Marcel