On 02.08.2013 10:14, techi eth wrote:
Come across one issue with conditional query execution.

Query: UPDATE COMPANY SET Name= 'test' WHERE ID = 2;
According to my understanding if no ID = 2 is present in table then error
should return but it return with SQLITE_OK however Name value is not
changed.

Cheers -
Techi
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
If there is no column with id = 2 there are no rows to update and that does mean your query was executed without any errors (the syntax was correct and everything you intended to do could be done) even if nothing had to be done.

If you would like to know if changes occured you can use the api functions

sqlite3_changes ()

or

sqlite3_count_changes ()


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

Reply via email to