>Usually, the SQLITE_LOCKED means that you tried to prepare or execute a >new SQL statement without resetting or finalizing a previous one on a >single connection. The statements should be prepared and executed this

I'm NOT getting SQLITE_LOCKED.
The error I get is SQLITE_BUSY (5).
For some reason sqlite3_errmsg() returns the string "database is locked"
when the error is SQLITE_BUSY.

And, yes I have tripplechecked all calls.

What I need to know is how to avoid this error and how to ensure the
database is not locked when the app exits.

/Martin

> Hi !
>
> I'm getting a lots of "database is locked" (code:5).
>
> My app keeps giving up on one machine, it might be that
> there is a network problem but I not 100% sure.
>
> Anyway, when the app hangs all the other machines
> including the machine where the database file is get
> the "database is locked" (code:5) error.
> To get rid of the error I have to close my app on all
> machines (five total) and sometimes reboot the machine
> with the database. As far as I can tell there are no
> processes still running.
>
> The database is as far as I know not corrupted and seems
> ok after "restarting the network".
>
> Why do I get "database is locked" (code:5) and what do I
> have to do to avoid it ?
> I can try to ensure that there is a try/catch block but
> I'm unsure how to unlock the database, Is it enough to
> do a sqlite3_close() or do I need to ROLLBACK TRANSACTION
> and sqlite3_finalize() before I sqlite3_close() ?
>
> Windows XP, SQLite 3.3.4.
>
> /Martin
> ma1999ATjmaDOTse
>



-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to