cjard
Well-known member
- Joined
- Apr 25, 2006
- Messages
- 7,081
- Programming Experience
- 10+
For example, when we do a database transaction, we:
what is magical about Using?
on a further note, if I said:
Dim myTransaction as New Transactions.TransactionScope
would my database queries still go into a transaction? How? What is "Using" actually doing with the object i created? Is it causing the code that follows to interact with it, or does TransactionScope have some magical ability to have all code that follows, participate?
VB.NET:
Using myTransaction as New Transactions.TransactionScope
'multiple database updates
End Using
what is magical about Using?
on a further note, if I said:
Dim myTransaction as New Transactions.TransactionScope
would my database queries still go into a transaction? How? What is "Using" actually doing with the object i created? Is it causing the code that follows to interact with it, or does TransactionScope have some magical ability to have all code that follows, participate?