VB.NET DataSet doesn't clear
I'm using the MYSQL .NET connector with an adapter to fill a dataset from a SELECT 开发者_如何学编程statement. Between different SELECT statements I use the DataSet.Clear() function. The Getxml shows me that the dataset is empty, however when cycling through the Table's columns, I have all the columns from all the tables used in prior SELECT statements.
How do I go about that without Dimming new Datasets for each table?
Remove the DataTables from the DataSet as so:
ds.Tables.Clear();
This will remove the DataTable
s in the collection. DataSet.Clear()
removes the rows from all the DataTables in the DataSet
精彩评论