ODBC and JDBC Developer’s Guide

Table Of Contents
28 FileMaker ODBC and JDBC Developer’s Guide
If file or JPEG data exists, the SELECT statement retrieves the data in binary form; otherwise, the SELECT
statement returns <null>.
To retrieve file reference information (such as the file path), use the CAST function with a SELECT
statement. For example:
SELECT CAST(Company_Brochures AS VARCHAR(NNN)) FROM Sales_Data
In this example, if you:
1 Inserted a file into the container field using FileMaker Pro but stored only a reference to the file, the
SELECT statement retrieves the file reference information as type SQL_VARCHAR.
1 Inserted the contents of a file into the container field using FileMaker Pro, the SELECT statement
retrieves the name of the file.
1 Imported a file into the container field from another application, the SELECT statement displays '?' (the
file displays as Untitled.dat in FileMaker Pro).
To retrieve data of a specific file type from a container field, use the GetAs function and specify the file’s
type. For example:
SELECT GetAs(Company_Logo, 'JPEG') FROM Sales_Data
The possible file types (case sensitive) you can retrieve from a container field in a FileMaker database file
are:
DELETE statement
Use the DELETE statement to delete records from a database table. The format of the DELETE statement is:
DELETE FROM table_name [ WHERE { conditions } ]
Note The WHERE clause determines which records are to be deleted. If you don’t include the WHERE
keyword, all records in the table are deleted (but the table is left intact).
File Type Description File Type Description
'BMPf' Bitmap 'PCD ' Kodak PhotoCD
'EMBO' OLE container data 'PDF ' Portable Document Format
'EMF+' Windows Enhanced Metafile Plus 'PICT' Mac OS (does not have 512-byte file-based header)
'EPS ' Embedded PostScript 'PNGf' Bitmap image format
'FILE' Result of an Insert File command 'PNTG' MacPaint
'FPix' Flash (FPX) 'qtif' QuickTime image file
'FORK' Resource fork (Mac OS) '.SGI' Generic bitmap format
'GIFf' Graphics Interchange Format 'snd ' Standard sound (Mac OS raw format)
'JPEG' Photographic images 'TIFF' Raster file format for digital images
'JP2 ' JPEG 2000 'TPIC' Targa
'META' Windows Metafile (enhanced) 'XMLO' Layout objects
'METO' Windows Metafile (original) '8BPS' PhotoShop (PSD)
'moov' Old QuickTime format (Mac OS)