Group: StrataFrame MVPs
Posts: 1.9K,
Visits: 21K
|
OK Gerard. Sorry, I thought you wanted a BO free of the duplicates. In fact you want the ones that are duplicates.
There might be easier ways to do it, but I would iterate through your BO and check each row if there is any other with the same content. Everytime I found one, I would store it in some kind of array, collection or even another instance of the same BO.
To look for duplicates, you can use the BO.CurrentDataTable.Select function, as in:
MyBO.CurrentDataTable.Select("MyColumnName = " & MyColumnCurrentValue & " AND MyPrimaryKeyColumnName <> " & MyCurrentPrimaryKeyValue).Length
If this line returned anything greater than 0 this would tell you this row had a duplicate and you could add it to your DuplicatesBO to show the user once finished.
|