I am working on a .NET 3.5 project and will be using a DataSet with multiple DataTables and relationships between the DataTables. I will be fetching a certain amount of records from SQL to fill the DataTables then process those records. After I am finished processing the records, I want to clear out the DataSet and fetch the next set of records. I have been reading that the Clear() method does not clear the rows from memory. How can I reuse the DataSet without causing my memory to continue to increase over the life of fetching records?
Share
MSDN states that the
DataSet.Clearmethod clears the DataSet of any data by removing all rows in all tables.. It will leave all tables and relations intact, but clear out all rows.Where did you read otherwise?