Bug #7712 Any type of flex grid control fails in VB/ADO with large recordsets.
Submitted: 6 Jan 2005 17:42 Modified: 30 May 2013 12:21
Reporter: Danny Bowman Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / ODBC Severity:S3 (Non-critical)
Version:3.51 OS:Windows (Windows XP SP2)
Assigned to: CPU Architecture:Any

[6 Jan 2005 17:42] Danny Bowman
Description:
If a large recordset is returned to any type of database grid control, the application will error out and kill the entire application.  For example, if I return the following query in and ADO recordset:

sSQL = "SELECT * FROM Booking"

When you set the grid control DataSource equal to the recordset:

g.DataSource = rs

The entire application will crash.

There are 104 fields in this Booking table.  This query normally returns 26310 records.  I can prevent the error from occurring if I append the query with the statement:

"LIMIT 900"

Anything over 1000 records will cause the application to crash, despite proper error handling.  This error occurs with both the MSFlexGrid and the MSHFlexGrid, as well as a third party vsFlexGrid.  

It should be noted that this error does NOT occur when running against an Access or SQL Server database.  It only occurs with MySQL with the MyODBC drivers.

How to repeat:
Using VB6, ADO, MySQL database (any version), and MyODBC drivers (any version) and assign alarge recordset with 30 or more fields with a few thousand records to the DataSource property of any grid control:

g.DataSource = rs

The application will crash.
[11 Jan 2005 6:04] Jorge del Conde
I was able to reproduce this using VC++ 6.0 SP6, and  FlexGrid OCX
[23 Jan 2007 17:50] Laurence Taylor
I have also reproduced this using a Data Dynamics SharpGrid 2.0 control.  However the results are more severe; any recordset above about 95 rows will cause the app to crash.

  sql = "SELECT logs.logID, logs.tim, sites.siteName, logMsgs.level, logMsgs.msgTxt, logs.freeText " & _
          "FROM (logs LEFT JOIN logMsgs ON logs.msgID=logMsgs.msgID) LEFT JOIN sites ON logs.siteID=sites.siteID " & _
          "WHERE (((logMsgs.pollLog) = True)) " & _
          "ORDER BY logs.tim;"
   
  m_rst.Open sql, g_conn, adOpenDynamic, adLockOptimistic
  Set SGG.DataSource = m_rst     'Crashes here with error
  SGG.MoveLast

"SGG" above is the name of the SharpGrid control.

The error we see is "Run-time error '-2147213225 (80042057)2:  SharpGrid operation failed."
Repeated the tests using ADO 2.1, 2.5 and 2.8 with the same results.

Would like to see this bug upgraded in severity as it is a considerable limit to functionality.  Stops our app working - having to go back to using Access as a back end, which is less than ideal.

WinXP SP2; MySQL 5.0.22-community; MyODBC 3.51.12; VB6.0.8169;
[17 Aug 2007 18:54] MySQL Verification Team
Could you please try with the latest release 3.51.19. Thanks in advance.
[17 Sep 2007 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[30 May 2013 12:21] Bogdan Degtyariov
I'm closing this bug because I can not continue without feedback from the reporter. If you have new info, please reopen the report.