[sqlite] Re: commit and rollback
arbalest06 <[EMAIL PROTECTED]> wrote: q#1: is it possible that multiple users can write into the database at the same time? No. q#2: if users A, B, C are writing to the database at the same time, They can't. q#3: if users A, B, C are writing to the database at the same time, They can't. Igor Tandetnik - To unsubscribe, send email to [EMAIL PROTECTED] -
[sqlite] Re: commit and rollback
d_maniger06 wrote: i have a list of records that i want to insert in my database..if ever an error occurred ( e.g. insert was not successful ), i want to undo all the previous inserts that i have done..to do this, i have read that i would need to use sqlite3_commit_hook and sqlite3_rollback_hook.. No, you don't need anything of the kind. Just issue a BEGIN statement at the beginning, then all your insert statements. If everything succeeded, issue a COMMIT statement at the end, otherwise issue a ROLLBACK statement. See http://sqlite.org/lang_transaction.html Igor Tandetnik - To unsubscribe, send email to [EMAIL PROTECTED] -