This group is for development OF NHibernate rather that WITH NHibernate. Please direct your post to the NHUSERS group.
Thanks, -Steve B. -----Original Message----- From: brijeshm misra <[email protected]> Sender: [email protected] Date: Wed, 3 Aug 2011 01:12:23 To: nhibernate-development<[email protected]> Reply-To: [email protected] Subject: [nhibernate-development] Cant query sybase with Nhibernate 3.2 Have started to use NHibernate on sybase ASE data, problem am facing is when I load entity I get below error "System.IndexOutOfRangeException : Invalid index 0 for this OdbcParameterCollection with Count=0." This is how I configure session properties["connection.provider"] = "NHibernate.Connection.DriverConnectionProvider"; properties["connection.driver_class"] = "NHibernate.Driver.OdbcDriver"; properties["connection.connection_string"] = @"Driver={Adaptive Server Enterprise};server=;port=; db=;uid=;pwd="; properties["dialect"] = "NHibernate.Dialect.SybaseASE15Dialect"; And object mapping <class name="MenuGroup" table="MENU_GROUP"> <id name="Id" column="id" type="Int32"> <generator class="identity" /> </ id> <property name="Name" column="name" type="String" length="100" not-null="true" /> <property name="Position" column="position" type="Int32" /> </class> and If I do var menuGroup = _session.Get<Menu.MenuGroup>(1); I get error NHibernate.Exceptions.GenericADOException : could not load an entity: [DomainModel.Menu.MenuGroup#1][SQL: SELECT menugroup0_.id as id1_0_, menugroup0_.name as name1_0_, menugroup0_.position as position1_0_ FROM MENU_GROUP menugroup0_ WHERE menugroup0_.id=?] ----> System.IndexOutOfRangeException : Invalid index 0 for this OdbcParameterCollection with Count=0
