Where exactly the data is stored when we create DataTable

  • Thread starter Thread starter Neha
  • Start date Start date
N

Neha

Hi,

I want to go for datatable instead of arrays. As I want to keep large
amt of data.
I just want to know. If I am exceeding the amount then will that be
saved in disc. Will it take care of memory issue.

Otherwise I will have to go for arrays and go on writing the same to
disc.

Please let me asap.

Thanks,
Neha
 
Neha said:
I want to go for datatable instead of arrays. As I want to keep large
amt of data.
I just want to know. If I am exceeding the amount then will that be
saved in disc. Will it take care of memory issue.

Otherwise I will have to go for arrays and go on writing the same to
disc.


A DataTable will be allocated exactly the same as an Array: it will use
memory from the Heap, which is in turn allocated from virtual memory. This
means that it will initially reside in RAM but parts of it may be paged into
disk as needed by the Operating System.

If you need to manage an amount of data that is too large to be kept in
memory, you may wish to consider using a database. ADO.NET contains classes
that will let you move (parts of) a table stored in a database from/to a
DataTable in memory.
 
Hi,

I want to go for datatable instead of arrays. As I want to keep large
amt of data.
I just want to know. If I am exceeding the amount then will that be
saved in disc. Will it take care of memory issue.

A DataTable is more memory intensive than an array. Inyour case you
should consider using a SQL DB, MS provide a free version that you can
download
 
Back
Top