Hi,
I have a program that opens a database and fills a datatable, with 0 rows, through a dataadapter. A text file is then parsed and the datatable has rows inserted into it with each row from the text file. When the program is done parsing the file and modifying the datatable, the dataadapter's update method is called and the database is updated. The program handles 2MB size text files fine, but when I put larger files such as 147MB files it errors out, as it is parsing the text file and updating the datatable, with a System.OutOfMemory error. What can I do to fix this? Is my only option to periodically call the adapter's update method and clear out the datatable, then continue parsing the text fiel?
I have a program that opens a database and fills a datatable, with 0 rows, through a dataadapter. A text file is then parsed and the datatable has rows inserted into it with each row from the text file. When the program is done parsing the file and modifying the datatable, the dataadapter's update method is called and the database is updated. The program handles 2MB size text files fine, but when I put larger files such as 147MB files it errors out, as it is parsing the text file and updating the datatable, with a System.OutOfMemory error. What can I do to fix this? Is my only option to periodically call the adapter's update method and clear out the datatable, then continue parsing the text fiel?