Hello Everyone,
I am trying to insert file using nHibernate. But when i try to insert row then i get exception. The exception is given below:
System.Collections.Generic.List`1[BusinessClassess.products]System.IndexOutOfRangeException: Invalid index 5 for this SqlParameterCollection with Count=5. at System.Data.SqlClient.SqlParameterCollection.RangeCheck(Int32 index) at System.Data.SqlClient.SqlParameterCollection.GetParameter(Int32 index) at System.Data.Common.DbParameterCollection.System.Collections.IList.get_Item(Int32 index) at NHibernate.Type.Int32Type.Set(IDbCommand rs, Object value, Int32 index) at NHibernate.Type.NullableType.NullSafeSet(IDbCommand cmd, Object value, Int32 index) at NHibernate.Type.NullableType.NullSafeSet(IDbCommand st, Object value, Int32 index, ISessionImplementor session) at NHibernate.Persister.Entity.AbstractEntityPersister.Dehydrate(Object id, Object[] fields, Object rowId, Boolean[] includeProperty, Boolean[][] includeColumns, Int32 table, IDbCommand statement, ISessionImplementor session, Int32 index) at NHibernate.Persister.Entity.AbstractEntityPersister.Insert(Object id, Object[] fields, Boolean[] notNull, Int32 j, SqlCommandInfo sql, Object obj, ISessionImplementor session) at NHibernate.Persister.Entity.AbstractEntityPersister.Insert(Object id, Object[] fields, Object obj, ISessionImplementor session) at NHibernate.Action.EntityInsertAction.Execute() at NHibernate.Engine.ActionQueue.Execute(IExecutable executable) at NHibernate.Engine.ActionQueue.ExecuteActions(IList list) at NHibernate.Engine.ActionQueue.ExecuteActions() at NHibernate.Event.Default.AbstractFlushingEventListener.PerformExecutions(IEventSource session) at NHibernate.Event.Default.DefaultFlushEventListener.OnFlush(FlushEvent event) at NHibernate.Impl.SessionImpl.Flush() at OrderSaleDAL.DALLayer`1.Save() in F:\Rnd Material\nHibernation\Sample Hibernate\ProductOrder\PointofSale\ProductOrders\OrderSaleDAL\DALLayer.cs:line 20 at WebApplication1.administrator.registerProducts.Button1_Click(Object sender, EventArgs e) in F:\Rnd Material\nHibernation\Sample Hibernate\ProductOrder\PointofSale\ProductOrders\WebApplication1\administrator\registerProducts.aspx.cs:line 53
Can anyone help me regarding this issue?? Waiting for quick response. Thanks in advance.
|