Jonas Sandman <[EMAIL PROTECTED]>
wrote:
Okay, now that I finally can get LIKE to work, my update seems to act
up instead.

It seems as if I sometimes get a SQLITE_LOCKED back from
sqlite3_reset(...).

Even though I try calling reset again, the actual insertion with
sqlite3_step(...) still returns error.
(1) SQL logic error or missing database

It's just the way SQLite reports errors (less than ideal, but we are stuck this way for backward compatibility): when sqlite3_step fails for any reason other than SQLITE_BUSY or SQLITE_MISUSE, it returns a generic error code SQLITE_ERROR. After that, sqlite3_reset or sqlite3_finalize return the actual reason why sqlite3_step failed (but reset or finalize themsleves do succeed, despite returning an error code).

So it's actually sqlite3_step that failed with SQLITE_LOCKED, not sqlite3_reset. This means some other connection (or even your own) is accessing the database at the same time. In particular, you cannot run UPDATE statements while you still have an outstanding SELECT in progress.

Igor Tandetnik

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

Reply via email to