On 4 Aug 2011, at 11:02pm, john darnell wrote: > The documentation says that when I close a database transactions in progress > are rolled back, but I cannot find a way of testing for whether a transaction > is completed.
SQLite does not do any tasks in the background. There's no need to pause for something to complete. There are two transaction models you can use: A) Declared transactions explicitly using BEING TRANSACTION and END TRANSACTION with any number of operations between the two. B) Do an INSERT or UPDATE operation without having used BEGIN TRANSACTION. If you do (B), then SQLite automatically wraps that single operation in its own transaction. This is slower than (A) if you're making lots of changes since it involves more work. So if you didn't already know about transactions, you were doing (B). > Is that the role of the finalize call? The finalize call completes the operation you're finalizing. You do it for each _prepare, and you should check the returned value to see you didn't get an error. Simon. _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

