byoung Posted January 28, 2003 Posted January 28, 2003 (edited) I know it is probably obvious, but I tried dataset.Tables(TableName).Dispose(), but it doesn't clear or delete the table by name. The next fill with the same tablename adds to the end of the dataset.tables(TableName). How do I Clear or Delete a dataset's Table? Barry Edited January 28, 2003 by byoung Quote
*Experts* Nerseus Posted January 28, 2003 *Experts* Posted January 28, 2003 You want to use Clear() if you're trying to remove the *rows* from the DataTable. If you want to clear them from database, you'll need to Delete() them and then call the DataTable (or DataSet's?) Update() method. Dispose is a .NET mechanism for cleaning up resources on objects. You'll pretty much never use it on a DataSet, DataTable, etc. -nerseus Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.