Hi, ALL,
Consider following piece of code:
int res = sqlite3_exec(..., "BEGIN"... );
if( res != SQLITE_OK )
{
printf( "Error occured on begin transaction. Please try again." );
return;
}
// some operations on the database
// if operations are successful
sqlite3_exec( ..., "COMMIT", .... );
// else
sqlite3_exec( ..., "ROLLBACK", ... );
Now, AFAIU, I need to check if the COMMIT is successful.
But what should I do if it fails? Do I just report the failure to the user?
Do I need to call ROLLBACK? And what if it will also fail?
And in "else" branch - do I check for "ROLLBACK" result? And if it fails
what do I do?
Thank you.
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users