SqlTransaction after catch transaction connection is null

前端 未结 2 1670
花落未央
花落未央 2021-01-18 09:56

I have a loop where I call stored procedure with different parameter value. Next call cmd.ExecuteNonQuery(); I use transaction to save all or rollback, and chec

2条回答
  •  无人共我
    2021-01-18 10:33

    I also met this odd problem (converting nvarchar to integer exception).

    In my solution, I rebuild the transacton if found the underlying connection is null. But it's a dirty work.

    enter image description here

提交回复
热议问题