Message Boards Message Boards

GROUPS:

Connect to a FileMaker .fmp12 database using DatabaseLink?

Posted 7 months ago
723 Views
|
2 Replies
|
0 Total Likes
|

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

2 Replies

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.

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...

    Needs["DatabaseLink`"]
    Needs["JLink`"]
    conn = OpenSQLConnection[
       JDBC["com.filemaker.jdbc.Driver", 
          "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:

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

    SQLSelect[conn, "FMdatabase_Name"]

etc. When done, of course evaluate:

    CloseSQLConnection[conn]
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract