Bug #8206 Data provider failed while executing a provider command
Submitted: 31 Jan 2005 3:09 Modified: 5 Feb 2005 16:39
Reporter: Daniel Kasak (Candidate Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / ODBC Severity:S3 (Non-critical)
Version:3.51.11-1 OS:Windows (Windows 2000)
Assigned to: CPU Architecture:Any
Tags: ODBC5-RC

[31 Jan 2005 3:09] Daniel Kasak
Description:
Executing a query from visual basic via an ADO connection to MS Access' linked tables causes an error:

"Data provider failed while executing a provider command"

System:
Windows 2000
Access 2002 developer
Microsoft Data Access Components
MyODBC-3.51.11-1
MySQL-4.0.22

How to repeat:
Create an MS Access 2002 database.
Add a linked table to a MySQL table.
Add some code:

---

Dim myconn as ADODB.connection, myset as ADODB.recordset, sqlstr as string

Set myconn = New ADODB.connection

With myconn
 .ConnectionString = CurrentProject.AccessConnection
 .CursorLocation = adUseClient ' I've tried adUseServer as well
End With

Set myset = New ADODB.Recordset

With myset
 .ActiveConnection = myconn
 .LockType = adLockReadOnly
End With

myset.Open "select * from some_linked_table"

---

Run the code. The last line will throw an error.

This problem *only* exists when connecting via ADO to MS Access linked tables. If I use an ADO connection to MySQL directly, it works fine. Also, the above approach works with MyODBC-3.51.09.

ODBC trace following ...
[31 Jan 2005 3:11] Daniel Kasak
Zipped ODBC trace

Attachment: ODBC_trace.zip (application/zip, text), 8.61 KiB.

[31 Jan 2005 15:04] MySQL Verification Team
I wasn't able for to repeat this issue with MS Access 2003 and
3.51.09/10-2 but instead I got different error message like
the connection can't be realized in this context. What it is
the MDAC version on your machine ?
[31 Jan 2005 22:45] Daniel Kasak
We're using MDAC-2.8.
[5 Feb 2005 16:39] Jorge del Conde
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html