KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I've got a really simple class that is giving a strange error. The class only has 1 property and the query is really simple. The stranglest part is that this seems to happen randomly. After getting this error usually refreshing the page makes it go a way and the application doesn't get the errror again. Could this be a problem with the database connection? I'm getting: [IndexOutOfRangeException: Department5_] System.Data.ProviderBase.FieldNameLookup.GetOrdinal(String fieldName) +4839010 System.Data.SqlClient.SqlDataReader.GetOrdinal(String name) +67 NHibernate.Driver.NHybridDataReader.GetOrdinal(String name) +46 NHibernate.Type.NullableType.NullSafeGet(IDataReader rs, String name) +87 NHibernate.Type.NullableType.NullSafeGet(IDataReader rs, String[] names, ISessionImplementor session, Object owner) +62 NHibernate.Loader.Loader.GetKeyFromResultSet(Int32 i, IEntityPersister persister, Object id, IDataReader rs, ISessionImplementor session) +213 NHibernate.Loader.Loader.GetRowFromResultSet(IDataReader resultSet, ISessionImplementor session, QueryParameters queryParameters, LockMode[] lockModeArray, EntityKey optionalObjectKey, IList hydratedObjects, EntityKey[] keys, Boolean returnProxies) +301 NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) +1422 NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) +114 NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters) +205 [ADOException: could not execute query [ select department0_.Department as Department5_ from tblDepartments department0_ where department0_.Department like 'CBS - %' ] [SQL: select department0_.Department as Department5_ from tblDepartments department0_ where department0_.Department like 'CBS - %']] NHibernate.Loader.Loader.DoList(ISessionIm
Tags (comma-separated)
Save Edits
Cancel