开发者

Unchained transaction mode

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜