I'm in the process of converting an Access database to a MySQL database. Cold
Fusion makes this pretty easy -- here's what I'm doing:
1) put Cold Fusion on a Windows machine. I believe there's a developer's
version you can get for free.
2) install MyODBC on that Windows machine and connect it to the MySQL database
on the Unix machine
3) define the Access database and the MySQL database as datasources in the Cold
Fusion administration utility
4) create the table structures in the mysql client to match the Access table
structures
5) use a simple Cold Fusion script with this template:
<cfquery name="getRecs" datasource="AccessDatabase">
select *
from TableName
</cfquery>
<cfloop query="getRecs">
<cfquery name="insertRecs" datasource="MySQLDatabase">
insert into TableName
(
<cfif #getRecs.Field1# IS NOT "">Field1</cfif>
<cfif #getRecs.Field2# IS NOT "">,Field2</cfif>
)
values
(
<cfif #getRecs.Field1# IS NOT "">,#getRecs.Field1#</cfif>
<cfif #getRecs.Field2# IS NOT "">,'#getRecs.Field2#'</cfif>
)
</cfquery>
</cfloop>
6) Alter script for each table and run. Voila!
monty@stripped on 03/22/2000 04:32:00 PM
To: myodbc@stripped@INTERNET
mysql@stripped@INTERNET
cc: (bcc: Derek M. Wickersham/0A/Caterpillar)
Subject: Converting Access tables to MySQL data on Unix
Retain Until: 04/21/2000 Retention Category: G90 - Information and
Reports
Caterpillar Confidential: Green
Hi!
A MySQL customer just asked me if anyone has been able to directly
access rows in a Access97 database file on Unix. If anyone has a
solution or know a solution (even commercial) of this, please mail me
about this.
The idea is to, from time to time, copy Access97 datafiles to an Unix
server and there extract the rows from them and put them into a MySQL
database.
Regards,
Monty
PS: I tried to search the email mailing archive before posting..
---------------------------------------------------------------------
Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
posting. To request this thread, e-mail myodbc-thread1366@stripped
To unsubscribe, send a message to the address shown in the
List-Unsubscribe header of this message. If you cannot see it,
e-mail myodbc-unsubscribe@stripped instead.