ODBC and JDBC Guide

Table Of Contents
Chapter 2 | Accessing external SQL data sources 11
1 In FileMaker Pro, do one of the following:
1 To import into an existing FileMaker Pro file, choose File menu > Import Records > ODBC
Data Source.
1 To create a FileMaker Pro file from the data source records, choose File menu > Open. In
the Open dialog box, choose ODBC Data Source for Files of type (Windows) or Show
(Mac
OS).
Choose your data source, enter the user name and password (if any), and click OK to open the
FileMaker Pro SQL Query builder dialog box.
Using the FileMaker Pro SQL Query builder dialog box, you can construct a query. Select the
table from which you want to import, and then select specific columns you want to use in your
SQL query. Use the WHERE tab to construct search criteria and the ORDER BY tab to specify
a sort order.
You can also type an SQL statement directly into the SQL Query builder dialog box.
You can execute the query immediately, or you can use the Import Records script step, the
Execute SQL script step, or the ExecuteSQL function to execute a query as part of a FileMaker
script.
Note ODBC import, the Execute SQL script step, and external SQL data sources are not
supported in runtime solutions created with FileMaker Pro Advanced.
See FileMaker Pro Help for more information on importing data, using the SQL Query builder
dialog box, and creating FileMaker scripts.
Executing SQL to interact with data sources via ODBC
In addition to importing data into a FileMaker Pro database file via ODBC, you can also interact
with data sources using SQL statements through the Execute SQL script step and the
ExecuteSQL function. You can use any SQL statement supported by the data source, such as
INSERT, UPDATE, and DELETE.
You can also use SQL statements that go beyond simply importing data into a FileMaker Pro
database file. For example, you could execute SQL statements that add records to a database
table in SQL Server, using information from a FileMaker Pro database file.
See FileMaker Pro Help for more information on creating FileMaker scripts that use the Execute
SQL script step and the ExecuteSQL function.
Working with ODBC tables in the relationships graph
When you add an ODBC table to the relationships graph, you can connect to and work with data
in external SQL data sources in much the same way that you work with data in the current, active
FileMaker database file.