I hope it isnt too wierd to reply to your own posts.... I just wanted to follow up with I found the following post: "[SQLITE] thread concurrency, inserts using transactions, bug?" The problem is multiple begins causing deadlock, and drh suggests using "BEGIN IMMEDIATE" and dealing with SQLITE_BUSY's. Sound like this could be my problem, that combined with a post about file locks being released after finalize (which I am violating in my question 3 below, unless reset releases file locks... that would be a wonder answer to know!)
Sorry for doing my homework after the fact. I would still appreciate everyone's 2 cents however. Thanks, Rich On 9/25/07, Rich Rattanni <[EMAIL PROTECTED]> wrote: > I have an unusual problem where one database I access becomes, and > stays locked (any attempt to BEGIN, PREPARE, etc results in > SQLITE_BUSY). I am at a loss after 5 hours of debugging to see where > I am, undoubtedly, screwing up. The particular database houses system > operating parameters, and the Could anyone please clarify the > following concerns I am having... > > 1) Can any transaction that is autocommited be the root of my problem > (I only BEGIN/COMMIT for large transaction) > > 2) After finalizing a statement and closing a database pointer, can > the file still be locked? > > 3) Some places I reuse a database pointer and statement over and over, > I typically leave the sqlite3_stmt pointer alone, because most of the > time I just want to rebind some things and re-step the statement. Can > this a problem? I exhaust the statements (they return sqlite_done)... > is the lock released so that I can do writes or is it still shared? > > Any small locking explanation (or better yet, an example explaining > what I could be doing wrong) would be appreciated. I have gone > through the locking webpage at sqlite.org and all it did was confirm > that my problem was not too obvious to me. > > > Thanks in advance for any help, > Rich > ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------