Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Check for Duplicates in Dataview
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01128261
Message ID:
01128287
Vues:
20
Hi, Riyaz...

If you're using VS2005, there's a method for the DataView object called ToTable, that allows you to convert the DV back to the datatable. One of the overloads for ToTable allows you to filter distinctively on duplicate rows.

As a simple example...suppose you have a flat file of thousands of invoices. You want to get a distinct list of the names from that table...
bool lFilterDistinct = true;
DataTable dtUniqueNames = dtInvoices.DefaultView.ToTable(lFilterDistinct,"FirstName,"LastName");
If you're using VS2003, you'll either have to write something to do it manually....or go back to the back-end database and do some kind of SELECT DISTINCT.

Hope that helps...
Kevin


Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform