By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,262 Members | 2,664 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,262 IT Pros & Developers. It's quick & easy.

How to TransferDatabase from Access to MySQL

P: n/a
Does anyone know if it's possible to use TransferDatabase to export data to MySQL?
If not, how would one go about it? Below is the code I tried to use, but it doesn't work.

sTable = "tblLead"
sODBC = "ODBC;Driver={MySQL ODBC 3.51 Driver};" & _
"SERVER=localhost;UID=root;PASSWORD=xxxxx;DATABASE =opc"
sODBC = "ODBC;DSN=OPC;UID=root;PWD=xxxxx;DSN=dsn1"

DoCmd.TransferDatabase acExport, "ODBC Databases", sODBC, acTable, sTable, sTable


I get the error message that ODBC Databases isn't an installed type or doesn't support the operation you chose. I'll go back to searching Google Archives, but id anyone had had good success working between Access and MySQL, I'd love to hear about the tricks.

Danny J. Lesandrini
dl*********@hotmail.com
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
From the help file for TransferDatabase I saw that one could transfer to any of a list of databases, the last of which is "ODBC Databases" (note the plural). That's what I put in my TransferDatabase line of code below, but it was wrong. It should be singular, "ODBC Database" ... since, after all, I'm not transfering it to many databases, but just one.

I should have figured it out sooner, but that was misleading on the part of the help file!

Danny
"Danny J. Lesandrini" <dl*********@hotmail.com> wrote in message news:cq********************@comcast.com...
Does anyone know if it's possible to use TransferDatabase to export data to MySQL?
If not, how would one go about it? Below is the code I tried to use, but it doesn't work.

sTable = "tblLead"
sODBC = "ODBC;Driver={MySQL ODBC 3.51 Driver};" & _
"SERVER=localhost;UID=root;PASSWORD=xxxxx;DATABASE =opc"
sODBC = "ODBC;DSN=OPC;UID=root;PWD=xxxxx;DSN=dsn1"

DoCmd.TransferDatabase acExport, "ODBC Databases", sODBC, acTable, sTable, sTable


I get the error message that ODBC Databases isn't an installed type or doesn't support the operation you chose. I'll go back to searching Google Archives, but id anyone had had good success working between Access and MySQL, I'd love to hear about the tricks.

Danny J. Lesandrini
dl*********@hotmail.com
Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.