E
Earl
My original post asked the question: what happens when you declare a
datatable with the same name in Class1 as you used in Class2? As Miha
pointed out, "DataSet won't be gc-ed until you drop all references to it ..
while you have at least one living reference DataSet instance will be
there." And Kevin Yu answered that, "If you still hold some reference to the
object, you have to fill the DataTable with other names, because the
original table is still in it." Excellent advice and duly noted.
Here's the issue however. I fill the DS with a dtSupply table in lets say
Class1. I clear this table out of the DataSet in Class2 before filling the
DataSet with a table with the the same dtSupply name as I used in Class1.
The schema for these two tables differs ... but the schema for the Class1
table stays in the DataSet ALSO! So while I can populate a table in Class2
with different data for the same table, the table SCHEMA itself remains in
the DataSet despite being cleared from the DataSet. From a practical
standpoint, this is a non-issue with what I am currently working on, as it
is easy enough to simply use a different name for the tables. But I am
curious if there is a "schema-clear" method for the datatables within the
dataset?
datatable with the same name in Class1 as you used in Class2? As Miha
pointed out, "DataSet won't be gc-ed until you drop all references to it ..
while you have at least one living reference DataSet instance will be
there." And Kevin Yu answered that, "If you still hold some reference to the
object, you have to fill the DataTable with other names, because the
original table is still in it." Excellent advice and duly noted.
Here's the issue however. I fill the DS with a dtSupply table in lets say
Class1. I clear this table out of the DataSet in Class2 before filling the
DataSet with a table with the the same dtSupply name as I used in Class1.
The schema for these two tables differs ... but the schema for the Class1
table stays in the DataSet ALSO! So while I can populate a table in Class2
with different data for the same table, the table SCHEMA itself remains in
the DataSet despite being cleared from the DataSet. From a practical
standpoint, this is a non-issue with what I am currently working on, as it
is easy enough to simply use a different name for the tables. But I am
curious if there is a "schema-clear" method for the datatables within the
dataset?