DISTINCT on ResultsetField

Posts   
 
    
raduch
User
Posts: 17
Joined: 26-Jan-2007
# Posted on: 17-Sep-2010 15:24:40   

Hello,

I have the following code:

ResultsetFields fields = new ResultsetFields(1); fields.DefineField(TyreFields.Height, 0); DataTable results = new DataTable(); LLBLDataAccessAdapter.Instance.Adapter.FetchTypedList(fields, results, null);

How can I apply DISTINCT on this field? Basically I need to do a "select distinct height from tyre". If it's not possible with ResultsetFields, is there a way to achieve this with LLBL v2.6?

Thanks

miloszes
User
Posts: 222
Joined: 03-Apr-2007
# Posted on: 17-Sep-2010 17:17:32   

You can try pass additional parameter (_allowDuplicates_ should be false) into FetchTypedList.

Regards, MiloszeS

raduch
User
Posts: 17
Joined: 26-Jan-2007
# Posted on: 17-Sep-2010 17:30:11   

Yes, this works. Thanks.