View Single Post
Old 11-27-2009, 10:39 AM   PM User | #1
scorpius420
New Coder

 
Join Date: Jan 2009
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
scorpius420 is an unknown quantity at this point
Unhappy .net mysql read() method freeze

Hello, I'm getting a rather bizarre problem.

I am using mysql with c# and .net, visual studio 2005. I have a simple loop to read data based on a query until the results are exhausted:

while(datarader.Read())
{
//do stuff
}

Now...I am trying to go through many thousands of records...and this loop is sort of required to run for more than an hour. It works fine for a while... but in the middle it freezes.

In debug mode I found out that it freezes on the .Read() method, so the culprit is not my own code. if I try to step over Read() it simply stays there.

If I try to make it "continue" it simply returns to the freeze state. It does not terminate the application or throw an exception however.

What is going on and how can I fix it? Thank you for any help!!
scorpius420 is offline   Reply With Quote