Limit maximum number of rows returned

Posts   
 
    
solidstore
User
Posts: 12
Joined: 11-Jul-2005
# Posted on: 25-Aug-2005 17:00:40   

Using the Adapter classes, is there a way to limit the maximum number of rows returned when also doing prefetches?

bclubb
User
Posts: 934
Joined: 12-Feb-2004
# Posted on: 26-Aug-2005 02:16:57   

Yes there is. When adding a path to a prefetch path one of the parameters is for the maximum amount of items to return. You can see more under the best practices part of the documentation.

IPrefetchPath2 path = new PrefetchPath2((int)EntityType.CustomerEntity); path.Add(CustomerEntity.PrefetchPathSubprojectCustomer, 0);