Jump to content

Copy records from FM to MySQL


Marcwa19197
 Share

This topic is 2301 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi,

i have a Filemaker Database with a TableA-fm. This Filemaker Database is hosted on an FMS14-Server, which is configured to use the MySQL-Odbc Driver to connect to an MySQL Server. The Mysql have the same Database and Table structure as the FM have. (TableA-mysql)

now i want to do the following:
Create a layout in FM on TableA-fm which let me enter Data (via Fields) to TableA-fm and simultaneously the same data to TableA-mysql on the MySQL Server. So i would like to have the same records of data in the FM-Table and the MySQL-Table.

Any ideas how to do that automatically, or sync TableA-fm to TableA-mysql

Link to comment
Share on other sites

With ESS you can drop a mysql table occurence on the relationship graph and work with it as if it was a Fm table occurence.

http://help.filemaker.com/app/answers/detail/a_id/13613/~/accessing-external-sql-data-sources-%28ess%29-overview-and-troubleshooting

No "sync" required as the MySQL data is live

Edited by Kris M
Link to comment
Share on other sites

you treat the ess table occurrence/fields and any layouts that leverage them as if they were FileMaker native objects. So ask yourself could i do this with native FM objects? if the answer is yes then your answer is probably yes.

To your point.. "For example: Field "Name" writes Data in TableA-fm and TableA-mysql"....why would you want to duplicate data.. just write to TableA-mysql

Edited by Kris M
Link to comment
Share on other sites

Why?

If you use the ESS functions in FileMaker, you are effectively writing to TableA-mysql and working on it through the FileMaker interface (same as any field on a layout) - so the data is written to one place, but looks like it is FileMaker data...

Link to comment
Share on other sites

yes I understand how to use ess and how to work with a table in fm.

but image I have one column in both table (TableA-fm and TableA-mysql) called 'forename'. I place a Field object on a Layout, how can I say that the input of this forename-field should be written in both tables? 

if this is not possible I have to add two field objects.. one for every table. forename-mysql and forename-fm, so the data must be entered twice..

Link to comment
Share on other sites

The data wouldn't be written in two tables - you would place the TableA-mysql::forename on the layout and just data enter into that.

Looks and acts like FileMaker, but is actually the mysql field. 

So, back to my question - why would you have a duplicate field in FileMaker ?

Link to comment
Share on other sites

  • 3 weeks later...

This is how I export data from FileMaker to SQL: http://wethecomputerabusersamongst.blogspot.com/2016/03/export-1-filemaker-record-as-xml-for.html

This page: https://github.com/TyrfingMjolnir/FMPXMLRESULT2MYSQL has 2 stylesheets, 1 for table definition, 1 for export of data

Edited by ggt667
Link to comment
Share on other sites

This topic is 2301 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.