I dont know if it is just me but I find the return codes for SQL operation
quite confusing. I am new to SQLITE, have learnt a few things and wanted to
know if going in the correct direction,

1. Return code for an UPDATE/DELETE query (ignoring other error conditions)
will be SQLITE_DONE regardless of the fact whether UPDATE succeeded or
failed. The only way to know whether the UPDATE succeeded or not is to use
sqlite3_changes() to determine the number of rows impacted by the last
executed SQL.

2. Return code for "SELECT a,b from table1 where a=100;" will be SQLITE_DONE
upon not finding a record where a=100.

3. Return code for a successful INSERT operation will always be SQLITE_DONE.

Appreciate your feedback.
-- 
View this message in context: 
http://old.nabble.com/SQLITE-return-codes-for-insert-delete-update-select-tp31597492p31597492.html
Sent from the SQLite mailing list archive at Nabble.com.

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to