3

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

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

2

You can use below code in your solutions-

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

  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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