On 5/11/2011 3:52 PM, cricketfan wrote: > 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.
What do you mean, "other" error conditions? And UPDATE statement that updates 0 rows is just as successful as one that updates 100 rows. It is not generally remarkable that the set of rows selected by WHERE clause happens to be empty. If this fact is of some special significance to your application, check for it with sqlite3_changes. > 2. Return code for "SELECT a,b from table1 where a=100;" will be SQLITE_DONE > upon not finding a record where a=100. Of course. The statement is quite done enumerating your zero-sized resultset. > 3. Return code for a successful INSERT operation will always be SQLITE_DONE. Yes. What else would it be? -- Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users