Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Total rows that we can add to datatable

Tags:

.net

ado.net

I wants to know whether there is any limit for number of rows that we can add to datatable. I am doing this in C# and .NET 2005. Actually my application is reading large text file around 40 MB,application reads text file line by line and adds it as row in datatable once all file reads then calls update method to update data to database.

I am not sure how many rows we can add to datatable. I just want to make my application secure from throwing any error in future if file size again increase.

Thanks.

like image 925
Avinash Avatar asked Oct 28 '10 06:10

Avinash


2 Answers

The maximum number of rows that a DataTable can store is 16,777,216

DataTable Class

like image 180
CD.. Avatar answered Oct 10 '22 05:10

CD..


Try google next time!

The maximum number of rows that a DataTable can store is 16,777,216.

Found on http://msdn.microsoft.com/en-us/library/system.data.datatable.aspx

like image 31
Yves M. Avatar answered Oct 10 '22 05:10

Yves M.