Hi there,
I have a strange problem here, when I try to setFirstResult any value other than 0 , I get an exception from the SQL Server.
The following code runs without any problem
Code:
em.createQuery("SELECT x FROM Article x ORDER BY x.ID")
.setFirstResult(0)
.setMaxResults(10);
but if I set the first result anything else than zero
Code:
em.createQuery("SELECT x FROM Article x ORDER BY x.ID")
.setFirstResult(1)
.setMaxResults(10);
then I get the following exception
Code:
Caused by: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Parameter 1 (""): Data type 0x38 is unknown.
Hibernate version
hibernate-3.2.6
hibernate-annotations-3.3.1
hibernate-entitymanager-3.3.2
MsSQL Driver
Microsoft SQL Server 2000 Driver for JDBC Service Pack 2 Version 2.2.0037
DB
MsSQL Server 2005 (9.00.1399.06)
Does anyone of you guys have an idea?