Max number of items to return

Posts   
 
    
Ian avatar
Ian
User
Posts: 511
Joined: 01-Apr-2005
# Posted on: 21-Apr-2006 23:45:20   

Hi,

If I have the following code...

adapter.FetchTypedList(fields, dynamicList, bucket, 10000, sortExpression, true);

What does the 10000 or max number of items to return do? The generated SQL doesn't have a 'TOP 10000' in it.

Cheers, I.

bclubb
User
Posts: 934
Joined: 12-Feb-2004
# Posted on: 22-Apr-2006 03:13:35   

Try only returning distinct rows. I see the top only if I do not allow duplicates.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39928
Joined: 17-Aug-2003
# Posted on: 22-Apr-2006 09:40:47   

top is only emitted in a scenario with relations if distinct is also emitted. Distinct is only emitted if you tell the query to do that, i.e. as Brian says: to set allowDuplicates to false.

If you don't want to specify a limit, you don't have to specify a high number, just specify 0.

Frans Bouma | Lead developer LLBLGen Pro