1. | What problem does MARS attempt to resolve? |
|
2. | How is MARS enabled? |
|
3. | What method enables you to easily wrap code that should execute within a single transaction? |
|
Answers
1. | MARS helps to resolve a problem developers would encounter with locking. This might occur when you perform updates and selects using different connections. |
2. | With SQL Native Client and OLEDB, you can add the MarsConn attribute to the connection string. With the SQL Native Client and ODBC, you can add the MARS Connection attribute to your connection string. With the SqlClient, add the MultipleActiveResultSets attribute to the connection string. |
3. | To easily utilize transactions, you can use the TransactionScope, which is part of the System.Transactions namespace. |