UniTransaction 抛出 NullReferenceException
我正在尝试开始事务,但是在调用 .Begin()
方法时会抛出 NullReferenceException,并且堆栈跟踪显示它来自 IBMU2.UODOTNET.UniTransaction.ServerTransaction(Int32 aKey)
。
有人成功使用过 UniTransaction 吗?如果是的话,我还缺少什么吗?
// note: Session is already connected
// and can do UniFile operations prior to this point.
UniTransaction transaction = session.CreateUniTransaction();
transaction.Begin(); // throws NullReferenceException
注意:该系统是 UniData 系统,而不是 UniVerse 系统。不确定这是否有影响。
[更新 2011-07-08] 仍然存在此问题。我们使用 UniData 版本 7.2(我认为具体是 7.2.6)并使用 UniObjects.NET 版本 2.2.3.7377。
I'm trying to begin a transaction however on calling the .Begin()
method throws a NullReferenceException and the stacktrace shows that it is coming from IBMU2.UODOTNET.UniTransaction.ServerTransaction(Int32 aKey)
.
Has anyone successfully used UniTransaction
, if so is there something that i'm missing?
// note: Session is already connected
// and can do UniFile operations prior to this point.
UniTransaction transaction = session.CreateUniTransaction();
transaction.Begin(); // throws NullReferenceException
Note: The system is a UniData system and not a UniVerse system. Not sure if that makes a difference.
[Update 2011-07-08] Still having this issue. We are using UniData version 7.2 (I think 7.2.6 specifically) and using the UniObjects.NET version 2.2.3.7377.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
更新: 自版本 2.2.5 起,UO.NET 事务对象已得到修复。
您可以在 2011 年 11 月下载最新版本 U2 客户端下载。
如果这不能解决您的问题,请与您的支持提供商联系。我发现系统中没有与此问题相关的未解决的错误。
您能提供更多代码吗?
首先,可以在执行
session.CreateUniFile
之前移动session.CreateUniTransaction
。不确定它是否有帮助(因为我们当前使用的是 COM UniObjects 而不是 .NET 库),但这就是他们在uonet.pdf 示例中的方式
Update: There has been a fix for the UO.NET Transaction Object as of version 2.2.5
You can download the lastest version in the Nov-2011 U2 Clients download.
IF that doesn't solve your issue, please get in contact with your support provider. I see no open bugs in system that relate to this issue.
Are you able to supply more code?
As a start, maybe moving the
session.CreateUniTransaction
before you do thesession.CreateUniFile
.Not sure if it will help (because we are currently using the COM UniObjects not the .NET library), but that is how they have it in the example in uonet.pdf