开发者

Unchained transaction mode

开发者 https://www.devze.com 2023-03-19 18:38 出处:网络
Am getting this error when I run a piece of code under .net transaction using tran = connectio开发者_JS百科n.BeginTransaction();

Am getting this error when I run a piece of code under .net transaction using

tran = connectio开发者_JS百科n.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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号