Link to home
Create AccountLog in
Avatar of rp
rpFlag for Portugal

asked on

Vb.net 2010 Ado.Net, datatable

i have a datatable with duplicate records, can filter datatable to show only one record for each, for ex with custid criteria.
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

You can use

Dim dTable As DataTable
dTable = OldTable.DefaultView.ToTable(True)

which returns distinct rows into a new table
ASKER CERTIFIED SOLUTION
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account