ODBC and JDBC Guide

Table Of Contents
Chapter 8
Reference Information
Mapping FileMaker fields to ODBC data types
This table illustrates how FileMaker field types map to the standard ODBC data types.
String length is optional in table declarations. All strings are stored and retrieved in Unicode.
Note FileMaker repeating fields are supported like arrays. Examples:
INSERT INTO mytable(repField[3]) VALUES (‘this is rep 3’)
SELECT repField[1], repField[2] FROM mytable
Mapping FileMaker fields to JDBC data types
The JDBC client driver uses the following mappings when converting FileMaker data types to
JDBC SQL types. (For information about these types, see the JDK 1.5 documentation web pages
at http://www.javasoft.com.)
FileMaker field type Converts to ODBC data type About the data type
text SQL_VARCHAR The maximum column length of text is 1 million characters,
unless you specify a smaller Maximum number of
characters for the text field in FileMaker. FileMaker returns
empty strings as NULL.
number SQL_DOUBLE The FileMaker number field type can contain positive or
negatives values as small as 10
-308
, and as large as 10
+308
,
with up to 15 significant digits.
date SQL_DATE
time SQL_TIME The FileMaker time field type can contain the time of day or
a time interval. A time interval is returned as a time of day,
unless it is less than 0 or greater than 24 hours (both return
a value of 0).
timestamp SQL_TIMESTAMP
container (BLOB) SQL_LONGVARBINARY You can retrieve binary data, file reference information, or
data of a specific file type from a container field.
Within a SELECT statement, use the CAST() function to
retrieve file reference information, and use the GetAs()
function to retrieve data of a specific file type.
calculation The result is mapped to the corresponding ODBC data type.
FileMaker field type Converts to JDBC SQL type
text java.sql.Types.VARCHAR
number java.sql.Types.DOUBLE
date java.sql.Types.DATE
time java.sql.Types.TIME