简体   繁体   English

NHibernate.Exceptions.GenericADOException错误代码

[英]NHibernate.Exceptions.GenericADOException error codes

I am developing application in C # with NHibernate and SQLServer. 我正在使用NHibernate和SQLServer在C#中开发应用程序。 I got this exception: 我有这个例外:

could not update: [MyApp.Client # 94] [SQL: UPDATE [Client] ...

The exception is caused by a unique key index in the client code field. 异常是由客户端代码字段中的唯一键索引引起的。

I want to know if exists any reference to the list of error codes nhibernate|hibernate. 我想知道是否存在对错误代码列表nhibernate | hibernate的引用。 Example: #94 --> unique key restriction I keep getting access SQLException to check that it is unique key constraint. 示例:#94->唯一键限制我一直在访问SQLException来检查它是否是唯一键限制。

I think the number 94 is not an error code, the message is trying to point you to the problematic object causing the error. 我认为数字94不是错误代码,该消息试图将您指向导致错误的有问题的对象。 By the way is this a web application, you should use Merge instead of update. 顺便说一下,这是一个Web应用程序,您应该使用Merge而不是update。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM