简体   繁体   中英

Maintaining transaction in stored procedure

I have two tables tblSOTransaction and tblSOTranasactionDet .

Database operation are being handled using different stored procedures for both tables.

How to maintain a single transaction between different calls to different stored procedures in both tables..

You can execute both stored procedures inside one single transaction.

So, basically you have to follow these steps:

  • Open transaction
  • try
  • Execute stored procedure 1
  • Execute stored procedure 2
  • commit transaction
  • catch -> rollbak transaction

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM