Requesting Filter Usage

From InterBase

Go Up to Writing an Application that Requests Filtering


You request usage of a filter when opening or creating a Blob for read or write access. In the call to isc_open_blob2() or isc_create_blob2(), pass the BPB, whose information InterBase will use to determine which filter should be called.

The following example illustrates creating and opening a Blob for write access. For further information about writing data to a Blob and updating a Blob column of a table row to refer to the new Blob, see Writing Data to a Blob.

Opening a Blob for read access requires additional steps to select the appropriate Blob to be opened. For more information, see Reading Data from a Blob.

isc_blob_handle blob_handle; /* declare at beginning */
ISC_QUAD blob_id; /* declare at beginning */
. . .
isc_create_blob2( status_vector, &db_handle, &tr_handle,
&blob_handle, /* to be filled in by this function */
&blob_id, /* to be filled in by this function */
actual_bpb_length, /* length of BPB data */
&bpb) ; /* Blob parameter buffer */
if (status_vector[0] == 1 && status_vector[1]) {
isc_print_status(status_vector);
return(1);
}

Advance To: