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.
- 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.)
- 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.)
- Before attempting to connect from Mathematica, make sure the FileMaker app is running and that the target database is open.
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]