作者:xhhh5_236 | 来源:互联网 | 2023-05-19 13:01
IamrunninganENDTRANSACTIONonmydatabaseandoccasionallyIgeterror我在我的数据库上运行ENDTRANSACTIO
I am running an END TRANSACTION
on my database and occasionally I get error
我在我的数据库上运行END TRANSACTION,偶尔会出错
#1 that "cannot commit - no transaction is active"
#1“无法提交 - 没有事务处于活动状态”
Is there a way to determine if a transaction is active before trying a commit? I have been tracking my "BEGIN TRANSACTIONS"
by hand but I feel there is a better way.
有没有办法在尝试提交之前确定事务是否处于活动状态?我一直在手工跟踪我的“BEGIN TRANSACTIONS”,但我觉得有更好的方法。
I am using the C API
我正在使用C API
3 个解决方案