问题
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.
回答1:
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
回答2:
The maximum number of rows that a DataTable can store is 16,777,216
DataTable Class
来源:https://stackoverflow.com/questions/4040523/total-rows-that-we-can-add-to-datatable