Hi all,
I have a huge text file, about 200MB and it contains many, many lines with line breaks. I want to add all of those lines (text) into a SQL server table. I am using the following logic
Opening a streamreader object
Reading each line
Appending a string variable so that i can get rid of the line breaks
Created a table in the database with one column as TEXT
The problems i am having are as follows
If I use streamreader.readall and pass that to the insert statement, i am getting an 'out of memory' exception.
If append the string a variable it's taking way, way to long to complete read the file.
What is the best way to read a very large text file, remove line breaks and add that to the database?
Thank you all in advance.
Ashwin
...
Go to the complete details ...