Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ClearOnFill parameter for FillDataSet()
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
00816068
Message ID:
00816956
Views:
15
I basically agree with you but it just that when I set ClearOnFill to true, I expect all tables to be clear. Maybe the flag should be called Clear1stTableOnFill. <g>

Stephen



>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.
Stephen Lee

--------------------------------
Too much to code
Too little time
--------------------------------
Previous
Reply
Map
View

Click here to load this message in the networking platform