Bug #10560 use VB link to access BUG of myodbc 3.51.11
Submitted: 11 May 2005 16:02 Modified: 24 Nov 2005 15:47
Reporter: jie zhang Email Updates:
Status: Not a Bug Impact on me:
None 
Category:Connector / ODBC Severity:S1 (Critical)
Version: OS:Windows (windows xp pro)
Assigned to: Bugs System CPU Architecture:Any

[11 May 2005 16:02] jie zhang
Description:
This code is bien in myodbc 3.51.10, but can't run in 3.51.11,
display odbc no connect.

Dim oTable As ADOX.Table
Dim sProv As String
Dim oCon As ADODB.Connection
Dim oCat As ADOX.Catalog

Set oTable = New ADOX.Table
Set oCat = New ADOX.Catalog
Set oCon = New ADODB.Connection

On Error GoTo ErrorHandler

oCon.Open JET_PROVIDER & ";Data Source=" & sDBName

Set oCat.ActiveConnection = oCon

With oTable
.Name = "MySQL_" & sAccessTableName
.ParentCatalog = oCat
sProv = "ODBC;" & _
"Driver={MySQL ODBC 3.51 Driver};" & _
"SERVER=localhost;" & _
"Database=" & msDatabase & ";" & _
"Trusted_Connection=Yes;" & _
"UID=" & msUser & ";" & _
"PASSWORD=" & msPassword & ";"

.Properties("Jet OLEDB:Create Link") = True
.Properties("Jet OLEDB:Cache Link Name/Password") = True
.Properties("Jet OLEDB:Link Provider String") = sProv
.Properties("Jet OLEDB:Remote Table Name") = sAccessTableName

End With
'Append the table to the tables collection
oCat.Tables.Append oTable
oCat.Tables.Refresh

oCon.Close 

How to repeat:
always.
[11 May 2005 19:43] jie zhang
IS BIEN ==>  IS FINE.    
"bien" is spanish.  Sorry!
[31 May 2005 10:49] jie zhang
It can't run in Windows 2003 + sp1, include myodbc 3.51.10.
[25 Oct 2005 15:12] Peter Harvey
Please try c/odbc v3.51.12 and report success/failure.
[26 Oct 2005 14:41] Sergey Vlasenko
The problem exists due to the code attached to bug report causes SQLDriverConnect with fDriverCompletion=SQL_DRIVER_COMPLETE and hwnd=0, which triggers error of SQLDriverConnect(). That check added somewhere in between of 3.51.9 & 3.51.10
[26 Oct 2005 19:28] jie zhang
Yes, MyODBC 3.51.12 can run in Windows XP + sp2,  Windows 2003, windows 2000 + sp4.    

But it can't run in Windows 2003 + sp1,  Windows 2000 Update Rollup 1 for Service Pack 4.  

Thanks in advance.
[24 Nov 2005 15:47] Sergey Vlasenko
The problem appears only with msjet40.dll version 4.0.9025.0.
Similar problem was reported in bug #11863.
When working with any other Jet 4 versions, the problem is not reproduced.
As per MS article on this msjet version (http://support.microsoft.com/?kbid=870753) "A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that is described in this article". So it is not a common update but a fix that applied to the system manually, in case of problems described in http://support.microsoft.com/?kbid=870753.