Duplicate Records return in dao.GetMultiAsDataTable

Posts   
 
    
Posts: 116
Joined: 18-Feb-2006
# Posted on: 22-May-2006 01:14:29   

When trying to build a TypedListDOA to return a database, I am having an issue returning distinct records. It is because of the relations that I am adding to it, however, I cannot use a grouping to remedy the situation. I have tried to specify allowDuplicates = "False" and it still doesn't work. I am not retrieving any data from the other table, however, I am filtering on it, sometimes. Here's what's going on:

I have a 1:n relation on a User -> UserDivision. In my filter, I have an optional parameter to check to see if the user is in a division. If the division parameter is not passed to the function, then retrieve users from every division and skip adding the filter.

I only want to have the User returned with distinct records (viewable), not 2 or 3 times, depending on the number of records in the UserDivision table.

Posts: 116
Joined: 18-Feb-2006
# Posted on: 22-May-2006 01:30:22   

I actually got around this by adding the relation when I needed to filter on that data. (When the Division was specified). This brought back distinct records.