Connect to Filemaker with ODBC

This article contains some pointers for customers using Iguana to connect to Filemaker on OS X.

By default Filemaker does not support ODBC support out of the box. There are some additional components to install and configure. It can be a little confusing figuring out all the pieces. For this reason we put this document together.

We did this with Filemaker version 14.

Install ODBC Manager

Apple omitted the ODBC administration utility in Leopard. Instead you can install the free ODBC Manager that is a free application maintained by Actual Technologies:

You can download and install it from that website.

Install ODBC Driver for Filemaker Pro

This is produced by Filemaker themselves.  It is not included in the standard install. It is necessary to go and get the xDBC which stands for database client installer from Filemaker.  At the time this document was written it could be found at:

Opening up the DMG file for that should give you something like:

Screen Shot 2016-01-07 at 9.00.35 AM

One can open up the ODBC Client Driver folder and run the pkg file in there to run through the wizard that installs the ODBC driver.

Enable ODBC Sharing

This must be done within the Filemaker application.  You will need to be running Filemaker with an open project with the database you wish to connect to.

From within Filemaker go to the menu File–>Sharing–>Enable ODBC/JDBC.

This dialog comes up. Configure it like this:

Screen Shot 2015-12-23 at 9.56.22 PM

In my example there was one table that happened to be called EMR. Next we need to set up an ODBC datasource.

Create ODBC Datasource

This is done within the free ODBC manager application that you installed previously:

Start by clicking on the Add… button:

Screen Shot 2016-01-07 at 9.21.13 AM

This should be what you see:

Screen Shot 2016-01-07 at 9.22.12 AM

If you have correctly installed the ODBC client drivers in the previous step then you should see FileMaker ODBC as a driver choice. Select it and click on the OK button. This should open up this dialog:

Screen Shot 2016-01-07 at 9.23.58 AM

Click on Continue to come to this dialog which is used to define the name of the datasource. For this example we use “Iguana”. This is the name via we will use within Iguana when connecting to this datasource:

Screen Shot 2016-01-07 at 9.27.40 AM

Click Continue for the next step to select what Filemaker instance to connect to:

Screen Shot 2016-01-07 at 9.30.28 AM

It’s very important to check the box to obtain the names of the available databases.  Click Continue and if you have Filemaker running the next dialog should look like this:

Screen Shot 2016-01-07 at 9.41.54 AM

We just leave the defaults as is, and click Continue to get this final dialog:

Screen Shot 2016-01-07 at 9.43.25 AM

Clicking on the Test button enables one to test the connection:

Screen Shot 2016-01-07 at 9.46.52 AM

Notice how one needs to enter the User ID and Password in this dialog? By default Filemaker has an Admin user with the password set to blank.

Click OK after setting the UserID and password correctly should give a successful test result.

Click Done on the main dialog afterwards to finish the creation of the new datasource. Most likely the operating system will require you to enter your user password to make this configuration change.

You should be able to connect Iguana to the filemaker using:

  • The datasource name – i.e. “Iguana” in this case.
  • User name – i.e. “Admin”
  • Password – i.e. “” blank.

Now this is how we would use these parameters to make a database connection object in the Iguana translator using the db.connect function. Here’s an example of creating a connection and querying all the rows we can get from a Patient table in the Filemaker database. This assumes that a Patient table exists in the database, if it does not then you will get a SQL error:

-- Make database connection object
local Conn=db.connect{api=db.FILEMAKER,name='Iguana',user="Admin",password=''}
-- Use it to make a SQL query, live=true means the query runs in the editor
local Result=Conn:query{sql="SELECT * FROM Patient", live=true}
-- Trace the data we got from the query result

From here the best next places to read are:

  1. Read about db.connect and db.query to learn more about Iguana’s database calls. You can also read about the other database calls in the API documentation.
  2. If you have a ‘vmd’ file which defines a set of database tables then this article explains how you can go about automatically creating those tables.

If you have any questions do feel free to ask.


Leave A Comment?