When a method does not do what you except look at the documentation, the documentation is your friend not your enemy if you want to be serious about programming.
So the documentation for
DataSet.Clear[
^] clearly states that all
rows in all the contained tables are removed. It mentions nothing about removing the contained
DataTable
's so it does
not do that.
You retrieve the number of tables like this
SpecificDataSet.Tables.Count
that immediately tells me that
SpecificDataSet.Tables
is some form of collection and thus it most likely have a
Clear
method,and what do you know
it does[
^]. So you should write
SpecificDataSet.Tables.Clear()