Using Transactions in Everyday Life

Now this is a cool tip. You can use transactions whenever you have to update several records in a coordinated manner. VB keeps as much in a cache as possible to reduce costly disk writing activity. With a transaction, everything gets written at once, instead of on every

.Update
method. The speed benefit can be enormous. I use this whenever possible when adding or editing records in a large recordsets

One caveat. If you attempt to do this with the ODBC connection we established earlier, you get the friendly message shown below:

Why? Because the ODBC driver we used does not support transactions. The moral of the story is: know your data source capabilities.

© 1998 by Wrox Press. All rights reserved.