Bug #24993 Select Statement is not working
Submitted: 12 Dec 2006 5:22 Modified: 12 Dec 2006 13:40
Reporter: anup ravi Email Updates:
Status: Duplicate Impact on me:
None 
Category:Connector / ODBC Severity:S2 (Serious)
Version:5.00.06 OS:Windows (Windows XP)
Assigned to: CPU Architecture:Any
Tags: ODBC5-R06

[12 Dec 2006 5:22] anup ravi
Description:
While using select statement from VB 6, the system crashes.The application is not allowing to execute the reportset with select statement. The sollowing is the VB statement which i am using for opening a recordset.

Dim conn As ADODB.Connection
Dim rs As ADODB.Recordset
conn.ConnectionString = ("DRIVER={MySQL Connector/ODBC v5};" _
& "SERVER=localhost;" _
& " DATABASE=Emp;" _
& "UID=test;PWD=test; OPTION=3")
conn.Open
Set rs = New ADODB.Recordset
sql = "SELECT * FROM my_ado"
rs.Open sql, conn, adOpenStatic, adLockReadOnly
rs.AddNew
rs!id = 1
rs!Name = "Test"
rs.Update
rs.Close

The system crashes while reaching the statement rs.open. The following is the error message i am getting.

AppName: vb6.exe	 AppVer: 6.0.81.76	 ModName: myodbc~1.dll
ModVer: 5.0.6.0	 Offset: 000c23c4

How to repeat:
While using select statement from VB 6, the system crashes.The application is not allowing to execute the reportset with select statement. The sollowing is the VB statement which i am using for opening a recordset.

Dim conn As ADODB.Connection
Dim rs As ADODB.Recordset
conn.ConnectionString = ("DRIVER={MySQL Connector/ODBC v5};" _
& "SERVER=localhost;" _
& " DATABASE=Emp;" _
& "UID=test;PWD=test; OPTION=3")
conn.Open
Set rs = New ADODB.Recordset
sql = "SELECT * FROM my_ado"
rs.Open sql, conn, adOpenStatic, adLockReadOnly
rs.AddNew
rs!id = 1
rs!Name = "Test"
rs.Update
rs.Close

The system crashes while reaching the statement rs.open.
[12 Dec 2006 11:53] Tonci Grgin
Hi and thanks for your report. I am a bit puzzled here. Why is this set to VS plugin category when it should be MyODBC?

 - What is the MySQL server version you're using?
 - What is MyODBC version you're using?
 - Is the actual problem "can not work with ADO/MyODBC ver.5.0.x"?

There are some known problems with MyODBC 5 and ADO and we're curently working on them.
[12 Dec 2006 12:18] anup ravi
MYSQL version is 5.1.12-beta
MY SQL Connector ODBC 5.00.06-beta-gpl
While running the application is not showing any error code or something like "an not work with ADO/MyODBC ver.5.0.x".
[12 Dec 2006 12:36] Tonci Grgin
Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments to the original bug instead.

Thank you for your interest in MySQL.

Explanation: Although reported against most recent version, this report is a
duplicate of Bug#17604 and Bug#24054. It is also connected to Bug#24163.
[12 Dec 2006 12:50] anup ravi
Sorry,these bug codes are not giving any proper answears. I want to know which MYSQL version will work smoothly with which version of MYODBC.

Thanks
[12 Dec 2006 13:19] Tonci Grgin
Hi Anup.

MyODBC 3.51.x is stable version suitable for use with all MySQL server versions. However, it lacks unicode support and support for some of new features available in server.
MySQL Connector/ODBC v5 is new, beta, version of ODBC connector suitable for 5.x MySQL servers. It is also planned to add unicode support to this version.

What's smooth running I can't really say since, in your example, you are actually using as much 3rd party components as you have MySQL ones (driver manager and ADO/ODBC bridge on the MS side and MySQL server/c/ODBC 5 on MySQL side, to be precise). There can be a problem in any of the them, not to mention your code. Did you thought of using NET framework bypassing ADO completely?
[12 Dec 2006 13:40] anup ravi
Great Mr Tonci Grgin, its working fine with MySQL ODBC 3.51 Driver.Thank you very much for your great support.
Anup