Solved

Export MS Access tables to SQL files

Posted on 2013-12-04
6
409 Views
Last Modified: 2013-12-05
I have a MS Access database on a PC. I want to export some (not all) of the tables in Access to a sql formatted file so I can sub-sequentially import them to a MySQL database on a web server; I know all bout doing the import part.

How can I export data from Access to .sql files?
0
Comment
Question by:Richard Korts
  • 3
  • 3
6 Comments
 
LVL 34

Expert Comment

by:PatHartman
Comment Utility
.sql is not a standard file format.  You're going to need to tell us what you want it to contain.  In any event, since it isn't standard, there is no built in export for it so you would need to write code to make it happen.

Can't you import .csv or .txt files into MySQL to transfer data?  Those are standard and can be created using point and click in the GUI or with a single line of VBA code.
0
 

Author Comment

by:Richard Korts
Comment Utility
PatHartman

Yes, I can use txt tab delimited. Can you point me in the right direction?

Thanks
0
 
LVL 34

Expert Comment

by:PatHartman
Comment Utility
Use the External Data tab if you want to do this through the GUI.  To do it in code, you would use the TransferText Method.  Help is very good once you know what you need.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:Richard Korts
Comment Utility
PatHartman

See attached. It thinks I want to IMPORT not EXPORT. How do I tell it (Access) that IT want to EXPORT?
export-access.jpg
0
 
LVL 34

Accepted Solution

by:
PatHartman earned 500 total points
Comment Utility
Sorry, I do mostly imports so that was a reflexive answer.  

To export, right click on the table or query and choose Export and then the file type.  The export dialog will open and you may need to push the "Advanced" button to change certain options.
0
 

Author Closing Comment

by:Richard Korts
Comment Utility
Works great, thanks.

Years ago I worked with Access a lot; seems odd that Export & Import are not "mirrors" of each other.

But it works!
0

Featured Post

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now