sx_RYOFilterCreate

<< Click to Display Table of Contents >>

Navigation:  Apollo API Listing >

sx_RYOFilterCreate

VB Declaration

Declare Function sx_RYOFilterCreate Lib "Apollo9.dll" () As Integer

C Declaration

SHORT FAR PASCAL sx_RYOFilterCreate (VOID);

Description

Creates an empty bitmap to be used in subsequent RYO Filter functions. Each bit in the bitmap represents one physical record in the table. If the bit is ON, the record will be visible when the RYO Filter is activated. If the bit is OFF, the record will be filtered out of the visible data set.

Bitmapped filter operations are used by the query engine to provide ultra high speed filtering. The RYO Filter functions allow the applications programmer to create custom bitmapped filters.

RYO Filter bitmaps may be removed from memory with sx_RYOFilterDestroy. They are also destroyed when the table is closed.

Return Value

Returns an integer handle that will subsequently identify this bitmap in further RYO Filter operations. If the result is zero, the operation failed.

VB Example

If Button1.Caption = "Activate Filter" Then

sx_RYOFilterActivate( hBitMap, RYOFILTER_NEW )

Button1.Caption = "Clear Filter"

Else

' Deactivate active bitmap does not destroy it  

sx_RYOFilterDestroy( 0 )

' Destroys bitmap, freeing allocated memory  

sx_RYOFilterDestroy( hBitMap )  

' Create new, empty bitmap  

hBitMap = sx_RYOFilterCreate

Button1.Caption = "Activate Filter"

End If

sx_GoTop

C Example

SHORT hBitMap;

 

if (!lstrcmpi(Button1.Caption, "Activate Filter")

{

sx_RYOFilterActivate( hBitMap, RYOFILTER_NEW );

lstrcpy(Button1.Caption, "Clear Filter");

}

else

{

// Deactivate active bitmap does not destroy it  

sx_RYOFilterDestroy( 0 );

// Destroys bitmap, freeing allocated memory  

sx_RYOFilterDestroy( hBitMap );  

// Create new, empty bitmap  

hBitMap = sx_RYOFilterCreate();

lstrcpy(Button1.Caption, "Activate Filter");

}

sx_GoTop();

See Also

sx_RYOFilterActivate, sx_RYOFilterCopy, sx_RYOFilterDestroy, sx_RYOFilterRestore, sx_RYOFilterSave, sx_RYOFilterSetBit