iBatis .net with Sqlite causes array out of bounds

529 Views Asked by At

I am using ibatis .net with sqlite for ORM. But, whenever i make the following call

IList clientList = mapper.QueryForList("ClientFirm.GetClientData", "A");

I get the following error :

Message "Index was outside the bounds of the array."

and here is the Stacktrace :

   at IBatisNet.DataMapper.TypeHandlers.CharTypeHandler.GetValueByName(ResultProperty mapping, IDataReader dataReader)
   at IBatisNet.DataMapper.Configuration.ResultMapping.ResultProperty.GetDataBaseValue(IDataReader dataReader)
   at IBatisNet.DataMapper.MappedStatements.PropertyStrategy.DefaultStrategy.Get(RequestScope request, IResultMap resultMap, ResultProperty mapping, Object& target, IDataReader reader)
   at IBatisNet.DataMapper.MappedStatements.PropertyStrategy.DefaultStrategy.Set(RequestScope request, IResultMap resultMap, ResultProperty mapping, Object& target, IDataReader reader, Object keys)
   at IBatisNet.DataMapper.MappedStatements.ResultStrategy.GroupByStrategy.Process(RequestScope request, IDataReader& reader, Object resultObject)
   at IBatisNet.DataMapper.MappedStatements.ResultStrategy.MapStrategy.Process(RequestScope request, IDataReader& reader, Object resultObject)
   at IBatisNet.DataMapper.MappedStatements.MappedStatement.RunQueryForList(RequestScope request, ISqlMapSession session, Object parameterObject, IList resultObject, RowDelegate rowDelegate)
   at IBatisNet.DataMapper.MappedStatements.MappedStatement.ExecuteQueryForList(ISqlMapSession session, Object parameterObject)
   at IBatisNet.DataMapper.SqlMapper.QueryForList(String statementName, Object parameterObject)
   at IBatisMapper.getAllClientData() in d:\Users\ae08964\ATNSource\ATN-AttorneyNetwork\trunk\ATN\App_Code\com\ubs\atn\model\admin\IBatisMapper.cs:line 67

It works fine, if the data set is around 50 to 100 , but fails for anything around more than 100(approx). Does anyone has an idea ?

1

There are 1 best solutions below

0
On

Figured it out..it had to do something with the Char type declared in the mapped object.