问:
当我调用以下方法时:
con.Begin_Transaction();
方法实现:
public void Begin_Transaction()
{
if (this.connection.State == ConnectionState.Open)
{
this.current_trans = this.connection.BeginTransaction(IsolationLevel.Serializable);
}
}
使用以下类:
DbProviderFactory providerFactory;
IfxConnection connection;
IfxCommand command;
IfxTransaction m_current_trans;
IfxParameter param;
IfxDataReader DR;
我得到以下异常:
IBM.Data.Informix.If Exception: ERROR [HY000] [Informix .NET provider][Informix]Transaction not available
请问这里有什么问题? 提前致谢。
最佳答案
要使事务正常工作,数据库应该启用日志记录,请检查它是否已针对您的情况完成,在需要撤消更改的情况下使用
关于c# - 交易不可用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6437714/