On Fri, 2 Aug 2013 14:04:40 +0530
techi eth <techi...@gmail.com> wrote:

> At the end of execution I am expecting SET will change the value but it
> actually doesn't SET the value due to wrong condition.
> 
> I will check return from sqlite3 & due to success return I am in wrong
> assumption.


You must separate errors calling sqlite3 lib and errors in sql. You get 
SQLITE_OK because sqlite3 lib executed your sql query sucessfully. If your sql 
where malformed, sintactically incorrect, etc... there's an error at sql level, 
not library and get an SQLITE_ERROR Sql error or unkown database (not database 
file, but database name in sql).

In this case, your sql code is correct, and when you execute it, there's no sql 
error nor library error. You can use sqlite3_update_hook(...) call to hook a 
callback code to count how many rows where affected on updating. It's 10-15 
lines of code + comments. Here's a pointer to it 
http://www.sqlite.org/capi3ref.html#sqlite3_update_hook , remember to free/fry 
it after use ;)

HTH

---   ---
Eduardo Morras <emorr...@yahoo.es>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to