Page 1 of 1

Data Readers - Bug?

Posted: Fri 07 Aug 2009 14:31
by anti
I've had the problem of our application "hanging" due to never returning from the CorLab (now Devart) MySql connector. The application hangs for about 6 to 7 minutes, then resumes normally. If there is a large batch of SQL statements to be executed (100's), it may or may not hang again during execution.

Our application uses version 4.85.35 of the CorLab.MySql component. I built another version of our app with the latest version from http://www.devart.com/dotconnect/mysql/. This version of our application had the same 'hanging' issue.

I decided to try the MySQL's Connector/NET 6.0. After a few hours of changing code to work with this connector, the application did not experience the same "hanging" issue as with the Devart component.

There was a line of code that threw an exception when using MySQL's Connector/NET that did not throw an error using Devart's connector, I believe the bug may be that the Devart component does NOT throw this error. I think the following code should produce an error:

Code: Select all

Dim Rdr as MysqlDataReader
Rdr = GetADataReader()
If(Rdr.HasRows) then
  'do something with results
Else
  Rdr = GetAnotherDataReader()
End if
Rdr.close()
The line with "GetAnotherReader()" throws an exception using MySQL's connector. Apparently it's OK to do this with the Devart connector, but eventually it causes a problem.

The fix is to add a Rdr.Close() before GetAnotherReader(). Doing so has solved the "hanging" issue.

Thoughts?

Posted: Mon 10 Aug 2009 12:57
by Shalex
You are right with your suggestion at http://www.devart.com/forums/viewtopic.php?t=15293 . Please see our explanation of this issue at that thread.