it will depend. if using sqlserver, transactions hold locks and may cause
contention issues, so you want them open fo as short a time as possible. if
you can do the transaction with a single sp call, then you have reduced the
time down to the minimum.
if you did
tran = conn.BeginTransaction()
// execute sql statement
tran.Commit()
then you have added network hops (real slow in server time), to the amount
of time the transaction locks are held.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.