Data Readers - Bug?

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
anti
Posts: 3
Joined: Fri 07 Aug 2009 14:20

Data Readers - Bug?

Post by 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 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?

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Mon 10 Aug 2009 12:57

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.

Post Reply