473,406 Members | 2,217 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

How to TransferDatabase from Access to MySQL

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
1 6900
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jer | last post by:
I am trying to export the results of a view from an .adp to an .mdb using TransferDatabase. The code I am using is DoCmd.TransferDatabase acExport, "Microsoft Access", _...
6
by: dixie | last post by:
I am using the Docmd.TransferDatabase to transfer part of a table into another smaller database. The source comes from a select query that transfers the part of the table that I need. The...
1
by: Jens Hofmeier | last post by:
Hello, i want to transfer a table from database sourceMDB to a password protected database named destMDB. I was not able to figure out where to specify the required password ind the parameters...
6
by: Dave Gehrig | last post by:
Hi guys, Using Access 2003 on XP. First time caller, long time listener. I am not a programmer per se, and all my training in coding in the past year or so has come from the wealth of info...
1
by: Shahzad | last post by:
Dear Respected Gurus, as i learned always from you, v had some remote sites, where the data we want to come at the end of day to our head office. so we want to transfer all data, at least all...
1
by: solar | last post by:
In copying tables i use the command Transferdatabase shown below.It is a good command, but i need the following refinement. I want to copy the table only when the Yes/No field "accepted" in the...
0
by: rdemyan | last post by:
I'm trying to use TransferDatabase to transfer tables from an external secured DB to a database created in the code. I would like to kind of use automation, although OpenCurrentDatabase apparantly...
3
by: Mogsey | last post by:
Dear All, I have what is likely to be a very small problem for an Access guru, connecting to an ODBC database in VBA in Access 2002. I recieve an error code of 3151 ODBC Connection to...
3
by: chris.spano | last post by:
I'm running Access 2003 on an XP machine, and there are multiple developers who are working on different "assignments" of our large database project. We all work on a local copy and export changes...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.