lihao 发表于 2013-2-3 10:34:04

[WARN ] 2010-11-18 11:34:16,359

2010-11-18 11:34:16,359 - org.hibernate.util.JDBCExceptionReporter - SQL Error: 0, SQLState: 24000 2010-11-18 11:34:16,359 - org.hibernate.util.JDBCExceptionReporter - ResultSet may only be accessed in a forward direction.org.hibernate.exception.GenericJDBCException: could not execute queryat org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)在网上搜索一番,发现我穿的参数(startIndex)值的问题。
q.setFirstResult(startIndex);
在sqlserver中,这个(startIndex)不能为负数。如果为负数回报上面的异常错误。
页: [1]
查看完整版本: [WARN ] 2010-11-18 11:34:16,359