SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Begin and commit transaction


Begin and commit transaction

Author
Message
sachinthamke
sachinthamke
Grasshopper
Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)

Group: General Forum Members
Points: 22 Visits: 23
Hi to all

I just want to information is that

Applying the transaction objects in Stores procedure is the best way or applying in the ado.net is the best way.


Sachin Thamke
Mumbai, India

j nuñez
j nuñez
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1179 Visits: 279
I think so.

If your requeriments and your business's logic allow it, it's better manage the transactions in the stored procedures inside SQL Server than manage from the client aplication.
Abhijit More
Abhijit More
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1273 Visits: 767
its all depend on your business logic. If you are managing the transaction in SP then should check it will not create any lock / deadlock for any application same applies to handling transaction in Application.

Abhijit - http://abhijitmore.wordpress.com
Gary Johnson-259336
Gary Johnson-259336
SSC Veteran
SSC Veteran (285 reputation)SSC Veteran (285 reputation)SSC Veteran (285 reputation)SSC Veteran (285 reputation)SSC Veteran (285 reputation)SSC Veteran (285 reputation)SSC Veteran (285 reputation)SSC Veteran (285 reputation)

Group: General Forum Members
Points: 285 Visits: 184
Two different scopes. If you utilize the ADO transaction everything called with that scope will be in the transaction. But if you handle the transaction within the SP you can limit it to only the portion of the SP you want to be in the transaction. Sometimes the ADO transaction would be good and other times the limited scope of the transaction in the SP is better.

All my SPs will have transaction handling as needed within the SP but will respect transactions outside of the SP as well.

Gary Johnson
Sr Database Engineer
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search