SQLite Forum

Confused about sqlite3_step / sqlite_reset / sqlite3_bind_xxx APIs
Login
> ... However, I'm confused about the special scenario where sqlite3_step() returned an error (like SQLITE_CONSTRAINT), then the next sqlite3_reset() is also returning an error (insead of SQLITE_OK as you wrote). Will sqlite3_reset() always return the same error as the previous sqlite3_step()? It's not so clear in the documentation...

The <u>[the sqlite3_reset() doc](https://sqlite.org/c3ref/reset.html)</u> says, "If the most recent call to sqlite3_step(S) for the prepared statement S indicated an error, then sqlite3_reset(S) returns an appropriate error code."  Is that unclear? Do you expect the doc to state exactly what error code will be returned? To me, the doc seems clear enough, even though "appropriate error code" leaves some ambiguity. If you disagree, perhaps you can make a case for more exactitude. My attempts at that seem strained.