On 03/24/2011 07:23 PM, Richard Hipp wrote: > On Wed, Mar 23, 2011 at 7:05 AM, Jean-Marie CUAZ<jm.c...@orens.fr> wrote: > >> Hello, >> >> In a Tcl script, is it safe to call the Tcl "_return_" command inside >> and before the end of a multi-statement "_transaction_" method (for >> aborting the Tcl procedure in case of Sql/application error) ? >> >> In other words is the transaction handled at the SQLite level "closed" >> safely (and the statements executed before the "return" invocation be >> rolled back automatically) ? >> > > Yes.
Clarification: The transaction will be closed correctly in all cases. But the statements will only be rolled back if the script returns TCL_ERROR (i.e. [return -code error]). Any other error code (ok, break or continue) closes the transaction but commits the statements. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users