<< Click to Display Table of Contents >> Navigation: Apollo API Listing > sx_DBFilter |
Declare Function sx_DBFilter Lib "Apollo9.dll" () As String
LONG FAR PASCAL sx_DBFilter (VOID);
Extracts the current filter conditional expression. If there is no filter set but there is a query set with sx_Query, the query expression is returned instead.
The conditional xBase expression is returned as a string. A NULL string is returned if there is no active filter or active query.
' User filter setting
Sub bFilter_Click ()
Dim lRecNum As Long
Dim cString As String
If Not FilterOn Then
cString = sx_FilterDlg(sxtest.hWnd, "STATE = 'CA'")
If Len(sx_DBFilter()) > 0 Then
FilterOn = True
End If
If FilterOn Then
bFilter.Caption = "&Reset"
End If
Else
' clear query
FilterOn = False
bFilter.Caption = "&Filter"
lRecNum = sx_Query(0&)
End If
End Sub
void CNamesForm::OnButtonFilter()
{
sx_FilterDlg(GetParent(), "STATE = 'CA'"));
// test if user set filter
if (lstrlen(sx_DBFilter()))
bFilterOn = TRUE;
...
}