开发者

transaction not available?

开发者 https://www.devze.com 2023-03-15 01:37 出处:网络
Q: When i call the following method: con.Begin_Transaction(); Method implementation: public void Begin_Transaction()

Q:

When i call the following method:

con.Begin_Transaction();

Method implementation:

 public void Begin_Transaction()
        {
            if (this.connection.State == ConnectionState.Open)
            {
        开发者_运维百科        this.current_trans = this.connection.BeginTransaction(IsolationLevel.Serializable);
            }
        }

Use the following Classes:

         DbProviderFactory providerFactory;
         IfxConnection connection;
         IfxCommand command;
         IfxTransaction m_current_trans;
         IfxParameter param;
         IfxDataReader DR;

I get the following exception:

IBM.Data.Informix.If Exception: ERROR [HY000] [Informix .NET provider][Informix]Transaction not available

What is the problem here please? thanks in advance.


For Transactions to work the database should be logging enabled, Please check if its done for your case, used in cases since it would be needed to undo changes

0

精彩评论

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