Help Me: SP Transaction within .Net Transaction - is it good.

  • Is it good to have TRANSACTIONs within the SP, though the SP is called under .net sqltransaction.

    will it harm any with this double transaction case?

    i dont know the impact, but i felt it good to include as, what if this SP is called from somewhere else where the .net transaction is unavailable.

    Need ur expertise.

  • From my point of view, SP level transactions are preferable to .Net ones. I would only use a .Net transaction in my code if I needed to execute a number of stored procedures in a batch and ensure they completed.

    If there was no detrimental effects to having a failed SP call I wouldst use one at all and handle the error in code.

  • SQL Server allows transactions to be nested for exactly this sort of situation. See http://msdn.microsoft.com/en-us/library/ms189336.aspx

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

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