Consider that each operation has an implied transaction that the server
manages. It's not necessary to manage the transactions yourself when a
single table operation is being done (that might be what you're doing).
Frankly, I don't recommend client-side transactions at all--I recommend that
folks use stored procedures that handle any transactions when changing more
than one base table.
--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Darin said:
Thanks for the reply Bill.
When I'm inserting/updating multiple tables I do the
trans.begintransaction and trans.commit and then close the connection.
My question is when I'm inserting/updating a single table I call
ExecuteNonQuery and call the Close() method of the connection object without
any commits in my code. Now that the connection went back to the pool is a
transaction is still pending since I didn't do any manual commits or does
the connection know I'm done and commits since I called Close()?