Hibernate version:
3.0
The generated SQL:
[11/28/05 15:38:19:828 CET] 5346dc97 SystemOut O Hibernate: select top 8006 tsupplier0_.SupplierID as SupplierID3_, tsupplier0_.Name as Name3_, tsupplier0_.Fax as Fax3_ from v_Supplier tsupplier0_ where (tsupplier0_.Name is not null) and len(ltrim(rtrim(tsupplier0_.Name)))>0 order by tsupplier0_.Name
I get :
[11/28/05 15:38:20:028 CET] 5346dc97 StaleConnecti A CONM7007I: Mapping the following SQLException, with ErrorCode 16,902 and SQLState S1000, to a StaleConnectionException:
java.sql.SQLException: sp_cursorfetch: The value of parameter 'nrows' is invalid.
[11/28/05 15:38:20:138 CET] 5346dc97 JDBCException W org.hibernate.util.JDBCExceptionReporter SQL Error: 16902, SQLState: S1000
[11/28/05 15:38:20:158 CET] 5346dc97 JDBCException E org.hibernate.util.JDBCExceptionReporter sp_cursorfetch: The value of parameter 'nrows' is invalid.
I'm on a SQL Server 2000.
This is my java code :
Code:
String req = "FROM TSupplier supplier "
+ " WHERE supplier.name is not null "
+ "AND LENGTH(TRIM(supplier.name)) > 0"
+ "ORDER BY supplier.
// getting Deposit list.
Query q = HibernateUtils.getSession().createQuery(req);
q.setFirstResult( 50 ).setMaxResults(250);
List supList = q.list();
On my computer this work great. but when I deploy this on my server, I get this error :(