Thanks for your replies. What you have all said makes sense (and, in my
defense, I did suggest that a nonsense - but properly formed - SQL
statement could still be processed "OK"). :-)

I first noticed this situation when studying the sample code for the
"SmartDB" C++ wrapper for SQLite. The author's code uses the return value
from sqlite3_exec() to report to the user whether the SQL entered by the
user succeeded or not. Having a msgbox report to the user that the "Query
was executed successfully" is actually, from a software ~user's~ point of
view, rather misleading.

>From a ~user's~ point of view, I think that if the code tested for the
possibility of ~not~ actually being able to modify a DB with an attempted
UPDATE query (perhaps by internally using a SELECT statement first, just to
see if the UPDATE's WHERE condition would even be feasible) might be a good
strategy. [The ~user~ might just like to be informed that the ~expected~ DB
write did ~not~ occur, even if the SQL looked superficially OK (and indeed
was properly processed by sqlite3_exec() "OK", too).]

Thanks.

Fred

_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to