MySqlDataReader not completing While Read()
Posted by: Brendan Bailey
Date: December 23, 2009 09:34AM

Hi, I've had this irregular error for days now and can't get to the bottom of it.
I have a dataReader that loops while Read() however it keeps jumping out of the loop with out error. It seems to be loosley time based but I really dont know I'm considering re-writing this section using the ODBC connector! This is what the code basically does:

sql = SELECT * FROM table_1 WHERE ...
Try
dr = MySqlHelper.ExecuteReader(conn, sql)
If dr.HasRows Then
Do While dr.Read()

'Do work...

'If True Then
Call Sub
End If

Loop
End If
Catch ex As MySqlException
Stop
Finally
dr.close()
End Try

Sub...

INSERT INTO table_2
INSERT INTO table_3

End Sub

table_1's reply contains many records the one which most reliably returns the error contains over 5000 it always stops at 1071 record count after about 6 mins. If I do some debugging it stops at 526 after about 6mins, on other load jobs it pops out after 8 mins.

I really dont see why this is happening there are no memory leaks etc I've been over the code a thousand times, is there abywhere I can check or find more info, or has anyone else experienced this.

Cheers,
baileyswalk.

bailey

Options: ReplyQuote


Subject
Written By
Posted
MySqlDataReader not completing While Read()
December 23, 2009 09:34AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.