Declaring an External Blob Filter to the Database
Go Up to Filtering Blob Data
To declare an external filter to a database, use the DECLARE FILTER
statement. For example, the following statement declares the filter, SAMPLE
:
DECLARE FILTER SAMPLE
INPUT TYPE –1 OUTPUT_TYPE –2
ENTRY POINT 'FilterFunction'
MODULE_NAME 'filter.dll';
In the example, the input subtype of the filter is defined as –1 and its output subtype as
–2. If subtype –1 specifies lowercase text, and subtype –2 uppercase text, then the purpose of filter SAMPLE
would be to translate Blob data from lowercase text to uppercase text.
The ENTRY_POINT
and MODULE_NAME
parameters specify the external routine that InterBase calls when the filter is invoked. The MODULE_NAME
parameter specifies filter.dll
, the dynamic link library containing the executable code of the filter. The ENTRY_POINT
parameter specifies the entry point into the DLL. Although the example shows only a simple file name, it is good practice to specify a fully-qualified path name, since users of your application need to load the file.