Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Is it possible to get listitems between a specified Row Index Boundary from a list using CAML

Ex: if there are 10000 records I would like to fetch records between 201 - 250

share|improve this question
add comment

2 Answers 2

This link has some info about generating pages of results in a CAML query, I have heard that this is ill-advised, though the function detailed in the article seems like a good solution:

http://blogs.msdn.com/b/dbadki/archive/2008/10/08/caml-query-execution-using-pagination-for-custom-columns.aspx

share|improve this answer
add comment

You can use below code in your solutions-

SPQuery w = new SPQuery() ; w.RowLimit = 10; w.Query = "1570";

share|improve this answer
    
SPQuery w = new SPQuery() ; w.RowLimit = 50; w.Query = "<Where><Gt><FieldRef Name='ID'/><Value Type='Counter'>1570</Value></Gt></Where>"; –  vipin Paliwal Aug 23 '10 at 10:04
1  
The problem is that ID's don;t have to be consecutive, if say item 100 to 300 are deleted, those id's are gone. Once an item has been created, ID's don't change. so querying for 201 - 250 will return an empty result –  Colin Jun 11 '11 at 22:23
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.