|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Get distinct values from a column in a datatableI am trying to find a way, other than iterating through every row or
requerring the database, to get the distinct values from a column in a datatable. Any help would be appreciated. Thanks. You will have to iterate over the rows so that you may compare for distinct
values. However, the logic may be prepared generically. Each datatable has a getenumerable method. internally, it loops over the list. You could create a generic GetDistinctEnumerable and pass in the datatable's enumerable. Perhaps you could then bind your data list repeater or datagrid to the result set. Show quoteHide quote "jvb" <gome***@gmail.com> wrote in message news:1138649249.758848.164480@z14g2000cwz.googlegroups.com... >I am trying to find a way, other than iterating through every row or > requerring the database, to get the distinct values from a column in a > datatable. > > Any help would be appreciated. > > Thanks. > I don't think you can get around iteration in one form or another, but this
should help http://support.microsoft.com/default.aspx?scid=kb;en-us;326176 Show quoteHide quote "jvb" <gome***@gmail.com> wrote in message news:1138649249.758848.164480@z14g2000cwz.googlegroups.com... >I am trying to find a way, other than iterating through every row or > requerring the database, to get the distinct values from a column in a > datatable. > > Any help would be appreciated. > > Thanks. >
IsDate("ISomeTimesHateProgrammingMarch2005") = True
Query Builder Cancel a thread - please help Dataset requery Simple (I hope) SteamReader DirectoryInfo question Assigning ListBox Current Selection to TextBox Tell to ASP.Net don't watch some web folders multiple tcp connections FileSystemObject filter? File Info Question |
|||||||||||||||||||||||