Link to home
Start Free TrialLog in
Avatar of Richard Korts
Richard KortsFlag for United States of America

asked on

Export MS Access tables to SQL files

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?
Avatar of PatHartman
PatHartman
Flag of United States of America image

.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.
Avatar of Richard Korts

ASKER

PatHartman

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

Thanks
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.
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
ASKER CERTIFIED SOLUTION
Avatar of PatHartman
PatHartman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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!