how to use sqltransaction in c#

前端 未结 6 2124
执笔经年
执笔经年 2020-12-05 10:56

I am using following code to execute two commands at once. I used sqltransaction to assure either all command get executed or rolled back.When I run my program without \"tra

6条回答
  •  Happy的楠姐
    2020-12-05 11:19

    Well, I don't understand why are you used transaction in case when you make a select.

    Transaction is useful when you make changes (add, edit or delete) data from database.

    Remove transaction unless you use insert, update or delete statements

提交回复
热议问题