DbiActivateFilter

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

DbiActivateFilter

Return to chapter overview

C syntax

DBIResult DBIFN DbiActivateFilter (hCursor, [hFilter]);

Delphi syntax

function DbiActivateFilter (hCursor: hDBICur; hFilter: hDBIFilter): DBIResult stdcall;

Description

DbiActivateFilter activates a filter.

Parameters

hCursor                Type: hDBICur                (Input)
Specifies the cursor handle of the cursor for which the filter is to be activated.

hFilter                Type: hDBIFilter                (Input)
Specifies the filter handle of the filter to be activated.

Usage

A single cursor can have many filters associated with it. If the filter handle is NULL, all filters for this cursor are activated. See DbiAddFilter for a detailed explanation of filters.

Prerequisites

The filter must have been successfully added with DbiAddFilter, which returns the filter handle.

Completion state

Once the filter is activated, the filter controls the record set and all operations for that cursor are affected. Only those records which meet the criteria defined by the filter will be retrieved. For example, moving to the next record moves the cursor to the next record that passes the filter criteria, not to the next sequential record. The filter provides a restricted view of live data.

DbiResult

Meaning

DBIERR_NONE

The filter was activated successfully.

DBIERR_INVALIDHNDL

The specified cursor handle is invalid or NULL.

DBIERR_NOSUCHFILTER

The specified filter handle is invalid.

See also

DbiAddFilter, DbiDeactivateFilter, DbiDropFilter