On Thu, Dec 23, 2010 at 9:52 AM, BareFeetWare <list....@barefeetware.com>wrote:
> > I want to be able to just send a series of SQL commands in a transaction as > a one block of text and have SQLite tell me either that it succeeded so > committed, or that it failed so everything has been rolled back. It is my > understanding that this is one of the primary purposes of transactions. In > this way, I can already string together a series of inserts, updates and > deletes and execute as one block in a transaction, I'd like to be able to do > the same with other SQL commands (eg drop and create). > > Tom, I think that the idea is to move only first (begin) and last (commit/rollback) from you queries. In this case your queries can still contain other queries like drop and create. You just have to check for error in step command and, analyze sqlite3_get_autocommit() and do rollback optionally (or do it anyway with a error being not error). Anyway, I think that getting rid of transaction commands make you queries more portable since you will be able to concatenate them before wrapping into begin/end Max Vlasov _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users