Begin and commit transaction

  • 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
  • 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.

  • 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

  • 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

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply