Message Boards Message Boards

Connect to a FileMaker .fmp12 database using DatabaseLink?


Using DatabaseLink, Is it possible to connect to and query a FileMaker .fmp12 database? If so, how?

POSTED BY: Murray Eisenberg
1 month ago

Murray, according to this link in FileMaker community the poster states that it can be done. I don't have access to FileMaker and I am assuming Mac OS on your end, but it jives with general JDBC connections.

POSTED BY: Hans Michel
1 month ago

A complete solution to my problem is presented in answers at the cited link in FileMaker Community. The following are resolutions of the particular issues I was having. I'm including them here for the sake of easier access.

  1. Make sure that the fmp (FileMaker Pro) database tables' names include no spaces. (If necessary, replace any such space with an underscore by using FileMaker's File > Manage > Database menu item, where with the Tables tab open, make the correction in the Table Name field and click the Change button.)
  2. In FileMaker, turn on ODBC/JDBC Sharing. (Open the database in File Maker. Use the File > Shairing > Enable ODBC/JDBC menu item and click the On radio button for ODBC/JDBC Sharing. If necessary, change the allowed access to the open file, e.g., select "Specify users by privilege set, click the Specify button, and check On for Full Access to the Admin account. The Admin account is one that FileMaker has by default, and by default it has no password. You may change that.)
  3. Before attempting to connect from Mathematica, make sure the FileMaker app is running and that the target database is open.
  4. Now in Mathematica...

    conn = OpenSQLConnection[
          "jdbc:filemaker://localhost/FMdatabase Name"], "Name" -> "FMP", 
          "Username" -> "Admin", "Password" -> ""]

Here FMdatabase Name is the name of the .fmp12 database file name, not the table name (and so spaces are OK here). In OpenSQLConnection: the value of option "Name" should be literally "FMP"; the value of "Username" should be literally "Admin" unless you changed the user name within FileMaker; and the value of "Password" should be the empty string unless you gave that user a password from within FileMaker.

The output from evaluating OpenSLQConnection[...] expression should be an SQLConnection[...] object (which you've assigned to variable conn (or whatever).

Now you may act upon the database. If it's just a simple (flat) database, you'll have just one table, as in:

 {FMdatabase_Name}             (* note the underscore that you put in the name within FileMaker *)

    SQLSelect[conn, "FMdatabase_Name"]

etc. When done, of course evaluate:

POSTED BY: Murray Eisenberg
22 days ago

Group Abstract Group Abstract