How do I remove table from dataset?

  • Thread starter Thread starter Grober
  • Start date Start date
G

Grober

I can't seem to find a method to delete a table from a dataset. Is there a
way to do that? Using C#.

/Grober
 
Hi Grober,
you must use the Remove method from DataTableCollection:

myDataSet.Tables.Remove(myDataTable);

or by name:

myDataSet.Tables.Remove("MyTableName");
 
Oh, I see. I tried to do it from the table object itself, which obviously
wasn't possible. Thanks!

/Grober
 
Back
Top