Deleting datacolumns

  • Thread starter Thread starter 11Oppidan
  • Start date Start date
1

11Oppidan

Hi,

Two questions using VB.NET and ADO .NET

What is the best way to remove/delete a datacolumn from a datatable (without
using a dataview).
What is the best way to re-order columns in a datatable.

Many thanks.
 
Thanks for Scotts's quick response.

Hi 11Oppidan,

DataTable.Columns.Remove takes the column name or column reference as
argument. To remove column using it's index, you can use
DataTable.Columns.RemoveAt method.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
You're welcome.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Back
Top