Jokez Posted December 5, 2007 Posted December 5, 2007 Hi! I have got an FM9 server up and running and I also made the odbc connection work so now I can drag in tables from my MySQL database. Now to my problem, We have for example field called name in a database Customer. We have the same table in Filemaker and what I want to do is that if a user changes in the field in Filemaker it should "flush" this to the mySQL database. Is his possible and how? Regards Joakim
IdealData Posted December 5, 2007 Posted December 5, 2007 This sounds like a synchronisation problem. I'm no expert here, but could you script this so when you change the FMP field you fire off a script to update the table OCCURRENCE for the SQL table.
Jokez Posted December 5, 2007 Author Posted December 5, 2007 Yeah thats one way to do it but don´t u need to have a ODBC driver installed on every machine then so that they can trigger SQL scripts? Isnt there any otherway to do this?
Jokez Posted December 5, 2007 Author Posted December 5, 2007 Offcourse I also wants that if something changes in MySQL then i want it to get over to the field in Filemaker...
Genx Posted December 5, 2007 Posted December 5, 2007 ... why not just use the sql table directly rather than creating an additional FM table.
Jokez Posted December 6, 2007 Author Posted December 6, 2007 Because we have majority of our data in Filemaker and just some data on mySQL for our webshop.. So we realy realy whant the ability to get the data from mySQL if customers change their data there and vise versa ... so my question remains.. is this possible B)
Genx Posted December 6, 2007 Posted December 6, 2007 Seems a bit dodgey to me but whatever. ESS works both ways - it gives you access to data to view and to change so you could really trigger an FM script via a plugin like eventscript or zippScript, to switch to a layout based on a MySQL TO, find the record on that L/O and update. To do it from the other side, shove some FM PHP API code into your site to update fm directly, seems kind of ridiculous to me though. Your other option is to have a script run nightly and scan every single record in your SQL table on some match field looking for changes compared to your fm records - really inefficient. Don't you think its a little redundant having two tables that serve exactly the same purpose in two different databases where the first database is supposed to store all the records in the second database and update any or all fields in its table when a change occurs in the table in the other database? Anything is possible, but just because its possible, it doesn't necessarily mean its smart.
Jokez Posted December 6, 2007 Author Posted December 6, 2007 No i think its just the way to do it, in FM we have for example an customer table with say 60 fields, in mySQL we only need like 10 of thoose and mySQL is way faster for the webusers. But there is no way that you could conect the databases via ODBC and if u make changes in FM it automaticly "pushes" it over to mySQL... but maybe the way to go is to trigger a script that collects the data in FM and just copy it over to the fields from the mySQL table? Regards Jocke
Genx Posted December 6, 2007 Posted December 6, 2007 But there is no way that you could conect the databases via ODBC and if u make changes in FM it automaticly "pushes" it over to mySQL. - TRIGGER SCRIPT IN FM USING PLUGIN. - USE ESS TO PULL MYSQL TABLE INTO FM AS TABLE OCCURANCE. - BASE A LAYOUT IN FM ON THIS OCCURANCE. - UPDATE THE NECESSARY FIELDS VIA AN FM SCRIPT -> NO ODBC ON CLIENT MACHINES NECESSARY
Jokez Posted December 6, 2007 Author Posted December 6, 2007 Ah thats what I ment Any good plugins to trigger scripts in Filemaker that you can recomend?
Genx Posted December 6, 2007 Posted December 6, 2007 trigger an FM script via a plugin like eventscript or zippScript
Jokez Posted December 7, 2007 Author Posted December 7, 2007 Thnx! I made it work just like I wanted! If you leave a field it triggers a script that updates mySQL... and my application on my webserver puts changed data back to Filemaker. // J
Recommended Posts
This topic is 6195 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 accountSign in
Already have an account? Sign in here.
Sign In Now