日期:2014-05-17  浏览次数:20611 次

查询的时候出现错误
“/”应用程序中的服务器错误。

calsses_id

说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 

异常详细信息: System.IndexOutOfRangeException: calsses_id

源错误: 


行 17:         public IList<Calsses> GetAllClasses()
行 18:         {
行 19:             return SqlMap.QueryForList<Calsses>("SelectAllClasses", null);
行 20:         }
行 21:         /// <summary>

源文件: c:\Users\qq\Downloads\IbatisDemo01\BLLService\ClassesService.cs    行: 19 

堆栈跟踪: 


[IndexOutOfRangeException: calsses_id]
   System.Data.ProviderBase.FieldNameLookup.GetOrdinal(String fieldName) +5328314
   System.Data.SqlClient.SqlDataReader.GetOrdinal(String name) +61
   IBatisNet.DataMapper.Commands.DataReaderDecorator.System.Data.IDataRecord.GetOrdinal(String name) +11
   IBatisNet.DataMapper.TypeHandlers.Int32TypeHandler.GetValueByName(ResultProperty mapping, IDataReader dataReader) +19
   IBatisNet.DataMapper.Configuration.ResultMapping.ResultProperty.GetDataBaseValue(IDataReader dataReader) +35
   IBatisNet.DataMapper.MappedStatements.PropertyStrategy.DefaultStrategy.Get(RequestScope request, IResultMap resultMap, ResultProperty mapping, Object& target, IDataReader reader) +251
   IBatisNet.DataMapper.MappedStatements.PropertyStrategy.DefaultStrategy.Set(RequestScope request, IResultMap resultMap, ResultProperty mapping, Object& target, IDataReader reader, Object keys) +26
   IBatisNet.DataMapper.MappedStatements.ResultStrategy.ResultMapStrategy.Process(RequestScope request, IDataReader& reader, Object resultObject) +252
   IBatisNet.DataMapper.MappedStatements.ResultStrategy.MapStrategy.Process(RequestScope request, IDataReader& reader, Object resultObject) +105
   IBatisNet.DataMapper.MappedStatements.MappedStatement.RunQueryForList(RequestScope request, ISqlMapSession session, Object parameterObject, IList`1 resultObject, RowDelegate`1 rowDelegate) +453
   IBatisNet.DataMapper.MappedStatements.MappedStatement.ExecuteQueryForList(ISqlMapSession session, Object parameterObject) +108
   IBatisNet.DataMapper.SqlMapper.QueryForList(String statementName, Object parameterObject) +181
   BLLService.ClassesService.GetAllClasses() in c:\Users\qq\Downloads\IbatisDemo01\BLLService\ClassesService.cs:19
   IbatisDemo01.TestPage.BindData() in c:\Users\qq\Downloads\IbatisDemo01\IbatisDemo01\TestPage.aspx.cs:25
   IbatisDemo01.TestPage.Page_Load(Object sender, EventArgs e) in c:\Users\qq\Downloads\IbatisDemo01\IbatisDemo01\TestPage.aspx.cs:20
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51
   System.Web.UI.Control.OnLoad(EventArgs e) +92
   System.Web.UI.Control.LoadRecursive() +54
   System.Web.UI.Page.ProcessReq