Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

ODBC export to mySQL... need some scripting help.

Featured Replies

  • Newbies

Hey folks;

I'm currently using myodbc to link fmp and a mysql database.

I've been able to easily import sql tables into a fmp db... no problem there.

My problem is in exporting back from fmp into a mysql table. I want to do this via odbc, not csv or any other means that involves extra steps.

In terms of SQL script, I think that what I want to do is TRUNCATE sql_table, followed by INSERT into sql_table.

What I can't figure out is how to script that from within FMP7... I can't make any sense of scriptmakers sql calculation area, which I assume is where one has to link FM fields to SQL columns. How, exactly do I build a script that funnels FM fields into the corresponding SQL column?

I am not a whiz with either FMP or SQL, but I think I can patch this together if someone would be kind enough to get me started.

thanks in advance,

Randy

  • Newbies

I didn't know about myodbc

Do you use Mac or PC?

http://dev.mysql.com/doc/connector/odbc/en/faq_2.html#SEC40

I am just learning myself.

The last couple of days I've been playing with the mysql driver from Actual Technologies

http://www.actualtechnologies.com/product_opensourcedatabases.php

I was able to import and do inserts like this

Scriptmaker -> execute sql -> calculation

"INSERT INTO `mysql_table_name` (`mysql_field_name`) VALUES ('" & fmp_field_name & "');"

Marino

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.