FileMaker <=> MySQL syncing? - 08-02-2005 , 07:18 PM
I'm in the process of trying to work out the feasibility of syncing
data between FMP and MySQL.
Filemaker runs on the office LAN but I am wanting a subset of the data
to be stored in MySQL to drive an e-commerce site. Likewise, any
orders/registrations etc that are first captured in MySQL I would like
to sync back to FMP. I guess the syncing would take place every few
days or so.
So I am after a two-way syncing of multiple related tables, not a
one-off, one-way migration of data.
Is this possible? Is anyone out there doing this with success?
Re: FileMaker <=> MySQL syncing? - 08-03-2005 , 10:50 AM
I've been attempting something similar - a 'live' two-way syncing
between filemaker and MySQL, i.e., changes to data in FM being
immediately reflected in a MySQL database and vice versa.
I'm still working on a very simple scale but so far its possible for FM
users to edit/create/delete records in the normal way, with these
changes being reflected in the db.
I use two FM fields for every user editable column in the database. One
(hidden) stores the current value in the database, the other is
presented to the user and allows entry of new values. One of these user
entry fields is validated by a calculation which compares each of the
fields with its equivalent database value. Any differences cause an
automatically generated SQL statement to be executed, which updates the
information in the database. The SQL statement is executed by a script,
which is called as part of the calculation (i use a plugin called
zippScript which allows scripts to be called within calculations...).
This approach is intended for updating one record at a time but it
would be possible to write a script which traverses every record,
comparing to the database values and updating any changes.
For MySQL -> FM syncing i have a simple script that imports database
values, matching with existing FM records and inserting new ones.
I hope this makes sense and is of some help.