非链式交易模式
当我使用 .net transaction 在 .net transaction 下运行一段代码时出现此错误
tran = 连接.BeginTransaction();
错误=> “存储过程‘pr_xxxxx’只能在非链式事务模式下运行。‘SET CHAINED OFF’命令将导致当前会话使用非链式事务模式”。
如何在交易中设置链式/非链式模式?我使用 ODBC 连接,我的数据库是 sybase
Am getting this error when I run a piece of code under .net transaction using
tran = connection.BeginTransaction();
Error=> "Stored procedure 'pr_xxxxx' may be run only in unchained transaction mode The 'SET CHAINED OFF' command will cause the current session to use unchained transaction mode".
How can I set chained/unchained mode in transaction?. Am using ODBC connection and my database is sybase
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在执行过程之前,您需要执行 SET CHAINED OFF 命令。此外,您可能需要通过设置 DbCommand.Transaction 属性并手动调用事务对象上的 Commit() 方法来确保禁用自动提交。
You need to execute the SET CHAINED OFF command before you execute your procedure. Also you may need to make sure auto commit is disabled by setting the DbCommand.Transaction property and manually calling the Commit() method on your transaction object.