Hello all,
I want to understand a situation; it's related to datatable clear().
I have a code that populate a typed datatable from Excel in a separate thread using a backgroundworker. This works well, the table is filled and I can see the data. Now, I want to clear the data from table and restart the import. The operation is ten times slower than the first time. My datatable variable is declared like this:
Private dt as new DataTable - not a local variable
I want that all subs from class to be able to use the table, that's the reason I declared the table as private.
What I want is to be able to create a new instance of dt (or clear allocated memory) - maybe this is the reason for slowdown. But I don't know how to do this. Please advice.
Thanks,
Costin




Reply With Quote
