473,386 Members | 1,962 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,386 software developers and data experts.

Conversion of Access97 to MySQL

Found this at http://icc.ucdavis.edu/iccdocs/joes.htm
It does work and is so much easier than anything else I tried.

PROBLEM: How to move all tables in an Access Database to MySql (data and
structure at once.)
BEST WAY: Don't mess with SQL export scripts. Establish an ODBC DSN
connection to MySQL using MyODBC, then use this run this tiny code in an MS
Access module (replace "NAMEOFDSNCONNECTIONHERE" with the name you specify
under the ODBC DSN tab in the ODBC control panel):

Function ExportToSQL()
Dim dbName As String, db As Database, i As Integer, nameext As String
Set db = CurrentDb()
nameext = "DATABASE=" & InputBox("Enter the name of the MySQL database for
this export.
_All tables except system and attached tables will be exported! These will
overwrite existing
_tables in MySQL so be sure!!!")
If nameext = "DATABASE=" Then End
For i = 0 To db.TableDefs.Count - 1
If db.TableDefs(i).Connect = "" Then 'if not an attached table
If Left(db.TableDefs(i).Name, 4) <> "MSys" Then
DoCmd.TransferDatabase acExport, "ODBC Database", _
"ODBC;DSN=NAMEOFDSNCONNECTIONHERE;UID=root;PWD=;LA NGUAGE=us_english;" _
& nameext, acTable, db.TableDefs(i).Name, db.TableDefs(i).Name
End If
End If
Next i
db.Close: Set db = Nothing
End Function

--
God Bless you,
Al Kolff

"There is a God we want, and there is a God who is. They are not the same
God. The turning point of our lives is when we stop seeking the God we want
and start seeking the God who is."
Patrick Morley
Seven Seasons of the Man in the Mirror
p184

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.721 / Virus Database: 477 - Release Date: 7/16/04
Jul 20 '05 #1
0 1151

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Tumurbaatar S. | last post by:
Hi, I'm running MySQL 3.23.55 on WinXP and have some problem using non latin charset. I've added these 2 lines under group of my.ini: character-sets-dir = c:/mysql/share/charsets/...
0
by: Al Kolff | last post by:
Found this at http://icc.ucdavis.edu/iccdocs/joes.htm It does work and is so much easier than anything else I tried. PROBLEM: How to move all tables in an Access Database to MySql (data and...
0
by: JMCN | last post by:
hi i'm trying to create an input box that will ask the users for the date (LW_Date)and then, open up the pass-through query with the specific date results from the input box. i typed in the date...
1
by: Mario Crevits | last post by:
My name is Mario Crevits, I'm from Belgium (Roeselare) and I'm working with Access97 for several years now. We are in an Access97-2000 migration project. I'm writing a wizard for the end-users to...
10
by: Arno R | last post by:
Hi all, I have a database that I need to use in different versions of Access. This is A97 in most places and A2k in a few other locations. (I develop in A97 and convert the db to A2k for these...
2
by: john in fl | last post by:
Hello Everyone, I have an Append Query that worked fine in Access97 but now fails to work in Access 2000. The error that occurs is that it puts null values in a field due to a "Type Conversion...
1
by: IamKJVonly | last post by:
I have office 97 which includes access97 and have built many access97 databases and use VB4 as the front end. I have just gotten a new computer which has 1 gig of memory on it and when I try to...
3
Ranjan kumar Barik
by: Ranjan kumar Barik | last post by:
HI Everybody, Any idea about DataFlex database conversion into MySql format. It's a PHP-MySql application and I need to extract some data from a DataFlex database application and insert it into...
3
by: Ramchandar | last post by:
Hi, I am creating reports using VBA code. I have the same query in a querydef residing both in Access97 and Access2003. The result of this querydef is then moved to a table in Access97 and...
1
ssnaik84
by: ssnaik84 | last post by:
Hi Guys, Last year I got a chance to work with R&D team, which was working on DB scripts conversion.. Though there is migration tool available, it converts only tables and constraints.. Rest of...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.