On Thu, Sep 19, 2013 at 5:50 PM, Igor Korot <[email protected]> wrote:

>
> 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?
>

You probably should report the COMMIT failure to the user, yes.

Beyond that, what you do depends on what you want to do next.  You can just
call exit(1) if that is appropriate.  Or you can ROLLBACK and keep using
the connection.  Or you can sqlite3_close() the database connection if you
want.

Depending on the reason for the COMMIT failure, you might be able to try it
again, after a delay.

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

Reply via email to