-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Paging Options With SQL 2000
PostPosted: Fri May 16, 2008 4:28 pm 
Newbie

Joined: Fri May 16, 2008 4:23 pm
Posts: 1
I have an application which needs to support both SQL 2000 and SQL 20005. While doing some profiling, I noticed SQL 2000 was not doing the paging at the database level.

Is there anyway to configure SQL 2000 to do the paging in the database? If not, does anyone know of a custom dialect which handles this?

Thanks,
Scott


Top
 Profile  
 
 Post subject: Paging Options With SQL 2000
PostPosted: Wed May 21, 2008 10:15 am 
Senior
Senior

Joined: Thu Jun 21, 2007 8:03 am
Posts: 127
Location: UK
Hi Scott,

The paging functions used in the 2005 dialect weren't introduced until SQL Server 2005. I am not aware of a dialect that implements complete paging for SQL2000.

Even the SQL 2000 dialect should use the TOP statement to limit the number of rows coming back.

Using the SQL 200 dialect, a query that has:
Code:
.SetFirstResult(10)
.SetMaxResults(10)


should issue something like:
Code:
SELECT TOP 20 FROM ...


and it just ignores the first 10 records of the result set.

Regards,
Richard


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.