MySQL Forums
Forum List  »  Microsoft Access

Access 03 & MySQL
Posted by: john papaioannou
Date: April 09, 2012 01:41AM

I am trying to use Access 03 as frontend and MySQL as backend in a DSNless connection. So far I have managed
to use ADO to connect

Dim Conn1 As New ADODB.Connection
Conn1.Open "DRIVER=MySQL ODBC 5.1 Driver;" & _
"SERVER=localhost;" & _
"DATABASE=sakila;" & _
"USER=root;" & _
"PASSWORD=1234;" & _
"OPTION=3;"

I now need to loop through the linked tables and update the tables. I used ADOX

'Refresh Linked Tables
For Each adoTbl In adoCat.Tables
If adoTbl.Type = "PASS-THROUGH" Then
' adoTbl.Properties("Jet OLEDB:Link Provider String") = XXXXXXXXXX
End If
Next

I can successfully loop through all linked tables, but need to assign the appropriate value to the liked table
according to the params I used in the ADO code above.

If I hover the cursor on any of the linked tables I receive

"ODBC;DSN=sample-MySQL;TABLE=actor" where "sample-MySQL" = the name of the DSN
and "actor" is the name of the table.

Does anyone know what the linked table properties should be set to? Should it be something like
adoTbl.Properties("Jet OLEDB:Link Provider String") = "ODBC;DSN=sample-MySQL;TABLE=" & adoTbl.Name

Many thanks,
John

Options: ReplyQuote


Subject
Views
Written By
Posted
Access 03 & MySQL
3152
April 09, 2012 01:41AM
1597
April 20, 2012 10:21AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.