Application Development Using Visual Basic® and .NET
by Robert J. Oberg, Peter Thorsteinson, Dana L. Wyatt
Database Transactions and Updates
When the data adapter updates the data source, it is not done as a single transaction. If you want all the inserts, updates, and deletes done in one transaction, you must handle the transaction programmatically.
The SqlConnection object has a BeginTransaction method that returns a SqlTransaction object. When you invoke the BeginTransaction method, you can optionally specify the isolation level. If you know what you are doing, and understand the tradeoffs, you can improve the performance and scalability of your application by setting the appropriate isolation level. If you set the isolation level incorrectly or inappropriately, you can have inconsistent or incorrect data results.[5]
[5] Discussing isolation levels ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access