Walaa wrote:
Since you are fetching one column, then use a DynamicList.
And specify false for the AllowDuplicates parameter of the fetch method.
hi walaa, i have been using the dynamicList as datasource for my drop down list, however the duplicates still persist. i had tried creating a typedList also, and using the LLBLProDataSource control, setting the AllowDuplicates properties to "False", yet i still get the duplicates, am i missing out something here? Below is the code i wrote for my dynamicList:
ResultsetFields fields = new ResultsetFields(1);
fields.DefineField(RCountryFields.CurrencyCode, 0, AggregateFunction.None);
DataTable dtCurrency = new DataTable();
TypedListDAO dao = new TypedListDAO();
dao.GetMultiAsDataTable(fields, dtCurrency, 0, null, null, null, false, null, null, 0, 0);
The table structure and sample data for my RCountry table are:
Country_Code Country_Name Currency_Code
US United State USD
UK United Kingdom Euro
FRN France Euro
AU Australia AUD
What i intend to achieve is to create a drop down list containing only the data in Currency_code column, and if you can see there are 2 entries of "Euro" here, if by using normal SQL, a SELECT Distinct will easily solve the problem, how can this be done in LLBL?
Thanks again.