Click here to Skip to main content
15,885,145 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to split a large datatable into multiple datatables in asp.net with c#?
In datatable there are around 4 lakh records. On filling it fully to the datatable out of memory exception comes. So wants to process bulk data fetched in chunks of data.
Posted
Comments
Vi(ky 15-May-14 4:16am    
you should fetch only number of records at a time instead of all records.
syed shanu 15-May-14 4:18am    
Use dataview and filter with your key words

Just get the total number of records and decide in how many pages you want to divide it.
Now pass the pageSize and pageNumber as parameter to procedure each time you fetch.

Because if you will fetch at a time no way you can handle the out of memory exception because you have to put it in memory before use. So retrieve data page wise only.
 
Share this answer
 
v2
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900