I'm actually working on a large Filemaker to MySQL conversion project right
now.  I don't need live data at this stage, so I've got a script running
that reads in a FilePro-generated CSV file each night.  It works fine,
though early on we had a problem with our old version of Filepro not
exporting its data in an escaped format (not escaping double and single
quotes, etc.)  To fix this I tweaked the LOAD DATA INFILE statement we were
using to look for start-of-line, end-of-line, and separator delimiters, like
so:

DELETE FROM my_table;
LOAD DATA INFILE '/path/to/my.csv' INTO TABLE my_table FIELDS TERMINATED BY
'","' LINES STARTING BY '"' TERMINATED BY '"\n';

This will still break if someone embeds the quote-comma-quote (",") sequence
in a string, but that isn't an issue in my case. If it is for you then take
a look at the Filepro docs and change the delimiters to something less
common.  If your version supports it, escaping the data that Filepro dumps
into its CSV files is the best solution.

Also, check your Filepro manual for information on how to change Filepro's
exported date format--the default is not a format that MySQL can translate.


-----Original Message-----
From: Warren Young [mailto:[EMAIL PROTECTED]
Sent: Monday, July 14, 2003 12:43 PM
To: MySQL List
Subject: Re: FileMaker Pro


Steve Marquez wrote:
> Does anyone know how to export a FileMaker Pro Database so that MySQL can
> use it? Anyone ever do something like this?

If you want a one-time transfer, the simple and cheap way is through
some sort of text file; CVS or tab-delimited, for example.

If you want the two databases to collaborate on a single set of data,
it's best to give MySQL the canonical copy and let FileMaker manipulate
it through ODBC.

If the data doesn't change very often, you can use FileMaker's built-in
ODBC support.  Just write a script to pull a copy of the data you want,
manipulate it in FileMaker, and then you can export a copy through a
text file as above.

If the data changes often or you need online manipulation of the data,
you can add a SQL plugin to FileMaker.  Do a Google search, you'll find
them.  There are at least two of them on the market, as I recall.
They're about $100 for a single seat, with site licenses available.



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to