??????? ???????? <[EMAIL PROTECTED]> wrote:
Ok, I tried to do reset for my statement and ... got SQLITE_BUSY too! I.e. sqlite_reset() (and sqlite_finalize() too) returns SQLITE_BUSY, althought statement seems to become reset and rollback complete at last.
When sqlite3_step fails, it always returns a generic SQLITE_ERROR code. A subsequent call to sqlite3_reset or sqlite3_finalize returns the specific error code that sqlite3_step should have returned. The _reset or _finalize itself succeeds, despite returning an error.
It's not clear why it was done this way originally, but now it is maintained for backward compatibility. If you use sqlite3_prepare_v2 instead of sqlite3_prepare to prepare your statements, you opt out of this legacy behavior: sqlite3_step would now return an appropriate error code directly, and sqlite3_reset and _finalize would only return error codes if they genuinely fail.
Igor Tandetnik
----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------