Testing the Function Return Value

From InterBase

Go Up to Defining the Filter Function (Embedded SQL Guide)


The filter function must return an integer indicating the status of the operation it performed. You can have the function return any InterBase status value returned by an internal InterBase routine.

In some filter applications, a filter function has to supply status values directly. The following table lists status values that apply particularly to Blob processing:

Macro constant Value Meaning

SUCCESS

0

Indicates the filter action has been handled successfully. On a Blob read ­(isc_blob_filter_get_segment) operation, indicates that the entire segment has been read.

FAILURE

1

Indicates an unsuccessful operation. In most cases, a status more specific to the error is returned.

isc_uns_ext

See ibase.h

Indicates that the attempted action is unsupported by the filter. For example, a read-only ­filter would return isc_uns_ext for an ­isc_blob_filter_put_segment action.

isc_segment

See ibase.h

During a Blob read operation, indicates that the supplied buffer is not large enough to contain the remaining bytes in the current segment. In this case, only ­ctl_buffer_length bytes are copied, and the remainder of the segment must be obtained through additional isc_blob_filter_get_segment calls.

isc_segstr_eof

See ibase.h

During a Blob read operation, indicates that the end of the Blob has been reached; there are no additional segments remaining to be read.

For more information about InterBase status values, see Language Reference Guide.

Advance To: