I've got a query that retrieves around 10000 records from a mysql database, these records I'm reading into a .csv file.
Now after 70 records the reader hangs and doesn't do anything anymore.
Never had this in my other code until this (maybe the large data that I want to retrieve).
My code is something like this:
using (var reader = db.Retrieve(sql))
{
while (reader.Read()) {
//write results to my file
}
}
The code hangs at 'while (reader.Read())'
I read this feed but no real answer was given. Or other solutions?