ds.Tables.Clear() clears all the tables in the dataset. There are just too many side effects. It is highly doubtful that this is what you want to do if you are retrieving multiple tables into a dataset.
Example: we retrieve a selective list of columns for all orders for a customer into a dataset, the user selects one, and then we retrieve just the selected order into another table in the same dataset. We don't want to clear all tables when the selected order is retrieved. Another example: you retrieve a lookup table into a dataset. Then you retrieve more records into another table and set a relation into the lookup table. When you requery the table you don't want to clear the lookup tables.
If you always want to blow away the tables just call GetDataSet instead of FillDataSet.
>If I can call ds.Tables.Clear() to clear the table collection first, would it make sense MM.NET can do that too?
>
>Stephen
>
>
>>When you think about it, how can MM.NET really know how may tables are returned from your stored procedure? I agree that it would probably be a good enhancement for the framework but might take some fancy footwork to get the coding right.