On 13 Sep 2012, at 8:54pm, Marcus Ilgner <mar...@doo.net> wrote: > Ok, I was under the impression that sqlite3_step would always return > the same error code as in the db.
There's no good way to guess what sqlite3_step() will return, especially if you called it after ignoring another error result code from another API call. It's normal for a program to deal with the results of sqlite3_step() of one of SQLITE_ROW SQLITE_DONE accordingly, then treat any other result code as an error that must be reported/logged without worrying about exactly which result code is being returned. > If I understand you correctly, it > could be expected behaviour that a locked table returns SQLITE_ERROR > instead of SQLITE_LOCKED? If you're finding a lot of results of SQLITE_LOCKED or SQLITE_BUSY then you probably forgot to set a timeout value, or have a network or hardware problem. That sort of thing happens all the time. In contrast SQLITE_ERROR indicates something completely different, more like bad memory management in C, or having ignored one error result you continued to call other API functions as if everything was working fine it should never happen if your code is well written. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users