Data Readers - Bug?

Data Readers - Bug?

Postby anti » Fri 07 Aug 2009 14:31

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 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
  Rdr = GetAnotherDataReader()
End if

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.

Posts: 3
Joined: Fri 07 Aug 2009 14:20

Postby Shalex » Mon 10 Aug 2009 12:57

You are right with your suggestion at . Please see our explanation of this issue at that thread.
Devart Team
Posts: 7343
Joined: Thu 14 Aug 2008 12:44

Return to dotConnect for MySQL