This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I use the following query object Query query = new Query { ViewName = "Taskresultsforlocation", Order = Order.By("Resulttime").Descending(), Page = Mindscape.LightSpeed.Querying.Page.Limit(50), QueryExpression = Entity.Attribute("LocationId") == aLocationId && Entity.Attribute("Resultdata").Like("%EPCId%") }; try {
IList foreach (var taskResult in taskResults) { I would expect the count of taskResults to be 50 but it is ALL the records in the table which is 200,000 + what am I doing wrong ?? thanks gmd |
|
|
I found the problem ... I set the pageoffset later query.Page = Mindscape.LightSpeed.Querying.Page.Offset(pageOffset); which obviously overrides the limit when I try to do this query.Page = Mindscape.LightSpeed.Querying.Page.Offset(10).Limit(50) as per documentation I get a compiler error what is wrong here ? regards gmd |
|
|
You will want to use Page.At(10,50) or Page.Offset(10).LimitTo(50) to express a offset and limit combination.
|
|
|
the to was missing in LimitTo also in your documentation (guide) thanks gmd |
|
|
Thanks - I will get the docs updated.
|
|