Developer’s Guide

Table Of Contents
11-2 Developer’s Guide
Using the FileMaker JDBC Driver
You can use the FileMaker JDBC Driver with any Java compiler or
RAD tool to connect with your database while you build the code for
your Java application or applet. After the Java application or applet
has been created, the FileMaker JDBC Driver must be present with
the files or included within the code in order for the application or
applet to communicate with the database.
To use the FileMaker JDBC Driver, your Java application or applet
must register the driver with the JDBC driver manager and you must
specify the correct JDBC URL from within the application or
applet.You need the JDBC URL to make the connection to the
database.
About the FileMaker JDBC Driver
The FileMaker JDBC Driver is a JDBC 1.2 API compatible driver
designed to work with the Java Development Kit (JDK) 1.3. It is a
Type 4 driver — a native protocol, pure Java driver that converts
JDBC calls directly into the network protocol used by the database
management system. This type of driver offers all the advantages of
Java including automatic installation (for example, downloading the
JDBC driver with an applet that uses it). The driver will work with
JDK 1.3 and Java 2 as long as you only use JDBC 1.2 calls in a
Java 2 environment.
Note Although the driver implements the entire JDBC 1.2 API, it
cannot be classified as a true JDBC-compliant driver because it
supports only a subset of SQL that matches the capabilities of
FileMaker Pro, and is therefore not fully SQL-92 Entry Level
compliant.
The FileMaker JDBC Driver is packaged as a Java archive file (with
the .jar filename extension) containing a collection of class files. The
archive file is named Fmpjdbc12.jar. The path to the file is:
FileMaker JDBC Driver > Fmpjdbc12.jar
The driver class and main entry point for the driver is named:
com.fmi.jdbc.JdbcDriver
Note The FileMaker JDBC driver as well as JDBC Examples were
updated since the release of FileMaker Developer 5.0v1. The
FileMaker JDBC driver now supports JRE 1.3. If you are using the
example files from FileMaker Developer 5.0v1, please replace them
with the example files on this CD. Three major changes to the JDBC
driver are:
1. The FileMaker JDBC driver now supports JRE 1.3
2. Corrected a problem where blank repeating fields were not
handled properly
3. Fixed problem where the specified column order was lost after the
first query.
Using a JDBC URL to connect to your database
In Java, most resources are accessed through URLs (Uniform
Resource Locators). A JDBC URL is used to identify the database so
the FileMaker JDBC Driver can recognize and establish a connection
with the database.
The JDBC URL consists of three main parts separated by colons:
jdbc:<subprotocol>:<subname>
The first part in the JDBC URL is always the JDBC protocol
(“jdbc”). The subprotocol is the driver name or the name of the
mechanism that supports multiple drivers. In this case, the
subprotocol is fmpro, which is registered with Sun Microsystems,
Inc. The subname is the IP address of the machine that is hosting
FileMaker Pro.
The FileMaker JDBC Driver connects to FileMaker Pro through an
HTTP connection. The subname in the JDBC URL includes an
HTTP protocol (such as HTTP or HTTPS), an IP address or domain
name, and an optional port number preceded by a colon.