sx_SetQueryBit

<< Click to Display Table of Contents >>

Navigation:  Apollo API Listing >

sx_SetQueryBit

VB Declaration

Declare Sub sx_SetQueryBit Lib "Apollo9.dll"

(ByVal lRecNum As Long,  

ByVal bValue As Integer)

Description

Sets a bit (on or off) in a query bitmap for the specified record number. If the bitmap does not exist (i.e., sx_Query has not been called or sx_Query has set a non-optimized filter), the bitmap will be created.

Note: sx_SetQueryBit should NOT be used against a partially optimized bitmap.

If combining sx_QueryBit settings with another query expression, execute sx_Query FIRST, and then set your bits in the existing bitmap.

Parameters

lRecNum: The record number of the bit that is being set. It must be > 0 and <= sx_RecCount.

bValue: The bit value. Pass TRUE if the bit is to be set,or FALSE if it is to be reset.

 

Return Value

TRUE if the bit is set and FALSE if not.

VB Example

' Filters out every other record where STATE="CA"

lRecno = sx_Query( "STATE='CA'" )

sx_GoTop

Do While Not sx_Eof()

sx_SetQueryBit( sx_Recno, False )

sx_Skip 2  

Loop

See Also

sx_GetQueryBit, sx_RYOFilterSetBit, sx_Query