Does Dataset.Tbl.Clear() clear all tables or One?

  • Thread starter Thread starter Daryll Shatz
  • Start date Start date
D

Daryll Shatz

Does a clear command (ie: DataSet11.TableName.Clear() ) clear just the named
table or all the tables in the set? It appears to be all? How can I clear,
in order to fill, a specific table in a dataset of many tables?

Thanks
 
¤ Does a clear command (ie: DataSet11.TableName.Clear() ) clear just the named
¤ table or all the tables in the set? It appears to be all? How can I clear,
¤ in order to fill, a specific table in a dataset of many tables?
¤

Try:

MyDataSet.Tables("MyDataTableName").Clear()


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
Thanks, Paul. I tried your syntax too and it still clears all the tables in
the dataset. I guess my question is:

What is it intended to do??? Have you used the Clear method and only had
it clear the named table? If so, this suggests an error in my logic/code
somewhere.

Has anyone else had this problem?



 
I discovered the error in my logic.

I had a listbox bound to a dataview. When I added a record to the dataview,
it triggered the listbox selected events. This somehow caused the other
tables to be cleared. I still need to find this connection but the problem
is mine not VB.

Please ignore this thread. Thanks


Daryll Shatz said:
Thanks, Paul. I tried your syntax too and it still clears all the tables in
the dataset. I guess my question is:

What is it intended to do??? Have you used the Clear method and only had
it clear the named table? If so, this suggests an error in my logic/code
somewhere.

Has anyone else had this problem?
 
Back
Top