Scott Leighton wrote:
OK, I've located my problem. I think I need a better understanding of
the 'locking'. Looks like my commits are failing due to earlier statements
remaining 'in progress'.
What I don't understand is this 'database table is locked' stuff. This is a
single process (no threads) accessing the database, what is locking it? A
previous SQL statement that hasn't finished or something?
The identical code worked fine with SQLite 2.8.x so the problem has to be
something related to the change in locking in 3.x.x but I'm not seeing it.
Whenever you start a SELECT statement (by calling sqlite3_step()) but have
not finalized that statement (using sqlite3_finalize() or sqlite3_reset())
the statement is probably holding a lock on the table(s) that are being
queried. Other SELECT statements can read those tables, but no other
statements can INSERT, UPDATE or DELETE those tables until after all the
SELECTs have been finalized.
--
D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565