Per Hultqvist
8/29/2002 11:28:00 AM
Hi,
There is a Select-method on the DataTable-class but I don't believe it
handles DISTINCT (I could not find anything about it in the documentation).
Maybe you can find a solution using the Unique-property on the DataColumn or
use the UniqueConstraint-class, maybe in combination with GetErrors-method,
and some errorhandling too. Maybe merging the DataTable to a new DataTable
with the Unique-property=True on the unique column and ignoring the rows
that generates an error. But to be honest, looping through the DataRows,
might just be the "quick" and "proper" solution.
/Per Hultqvist
"Spong" <deSpong@hotmail.com> wrote in message
news:eRpmvKtTCHA.436@tkmsftngp10...
> Is there any "quick" or "proper" way of doing a "SELECT DISTINCT colname"
on
> a DataTable?
>
> Or do I have to loop through all the rows in the table and manually pick
out
> the distinct ones?
>
> Thanks.
>
>