问题描述
使用NHibernate(1.2.0.3001)进行查询时出现错误.
异常详细信息: System.ArgumentOutOfRangeException:计数不能小于零.
参数名称:count
源错误:
I got an error when using NHibernate (1.2.0.3001) to do a query.
Exception Details: System.ArgumentOutOfRangeException: Count cannot be less than zero.
Parameter name: count
Source Error:
在执行当前Web请求期间生成了未处理的异常.可以使用下面的异常堆栈跟踪来标识有关异常的来源和位置的信息.
堆栈跟踪:
[ArgumentOutOfRangeException:计数不能小于零.
参数名称:count]
.System.String.CopyTo(Int32 sourceIndex,Char []目标,Int32 destinationIndex,Int32计数)+2830785
System.IO.StreamWriter.Write(String value)+78 字体>
System.IO.SyncTextWriter.Write(String value)+25 字体>
NHibernate.Impl.BatcherImpl.LogCommand(IDbCommand命令)+464 字体>
NHibernate.Impl.BatcherImpl.Prepare(IDbCommand cmd)+31 字体>
NHibernate.Impl.BatcherImpl.ExecuteReader(IDbCommand cmd)+24 字体>
NHibernate.Loader.Loader.GetResultSet(IDbCommand st,RowSelection选择,ISessionImplementor会议)+182
NHibernate.Loader.Loader.DoQuery(ISessionImplementor会话,QueryParameters queryParameters,Boolean returnProxies)+175
NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor会话,QueryParameters queryParameters,Boolean returnProxies)+56
NHibernate.Loader.Loader.LoadEntity(ISessionImplementor会话,对象ID,IType identifierType,Object optionalObject,Type optionalEntityName,Object optionalIdentifier,IEntityPersister持久性对象)+252
[ADOException:无法加载实体:[Lookup#5] [ SQL:SELECT ... FROM查找.WHERELookupID =?]]
NHibernate.Loader.Loader.LoadEntity(ISessionImplementor会话,对象ID,IType identifierType,Object optionalObject,Type optionalEntityName,Object optionalIdentifier,IEntityPersister持久性对象)+370
NHibernate.Loader.Entity.AbstractEntityLoader.Load(ISessionImplementor会话,对象ID ,对象optionalObject,对象optionalId)+32
NHibernate.Loader.Entity.AbstractEntityLoader.Load(Object id,Object optionalObject ,ISessionImplementor会话)+17
NHibernate.Persister.Entity.AbstractEntityPersister.Load(Object id,Object optionalObject ,LockMode lockMode,ISessionImplementor会话)+117
NHibernate.Impl.SessionImpl.DoLoad(Type theClass,Object id,Object optionalObject,LockMode lockMode,布尔值checkDeleted)+729
NHibernate.Impl.SessionImpl.DoLoadByClass(类型clazz,对象id,布尔值checkDeleted,布尔值allowProxyCreation)+581
NHibernate.Impl.SessionImpl.Get(类型clazz,对象ID)+ 78
NHibernate.Impl.SessionImpl.Get(Object id)+64
System.Web.UI.Control.OnLoad(EventArgs e)+99
System.Web.UI.Control.LoadRecursive()+47 字体>
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,Boolean includeStagesAfterAsyncPoint )+1061
推荐答案
感谢您的发帖!我建议将您的问题发布到以下一个ASP论坛中: http://forums.asp.net/
祝您度过愉快的一天!
这篇关于Nhibernate-System.ArgumentOutOfRangeException:计数不能小于零.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!