交易不可用?
问:
当我调用以下方法时:
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 异常:错误 [HY000] [Informix .NET 提供商][Informix]交易不 可用
请问这里有什么问题? 提前致谢。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为了使事务正常工作,数据库应该启用日志记录,请检查它是否适合您的情况,在需要撤消更改的情况下使用
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