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.
精彩评论