[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
DBFILTER()
DBFILTER() determines the expression of the active filter in the
current work area.
Syntax
DBFILTER()
Returns
A character string.
DBFILTER() returns as a character string the filter condition defined
in the current work area. If no FILTER has been SET, DBFILTER()
returns a null string("").
Example
The following user-defined function, CreateQry(), uses DBFILTER() to
create a memory file containing the current filter expression in the
memory variable "qry_string". The memory file is named with the
extension "qwy" to indicate that it contains a query.
FUNCTION CreateQry
PARAMETERS qry_name
*
qry_string = DBFILTER()
SAVE ALL LIKE qry_string TO &qry_name..qwy
RETURN .F.
You can later RESTORE a query file created by CreateQry() with the
following user-defined function, SetFilter(). This function RESTOREs
the query file and then SETs FILTER TO the condition stored in the
variable "qry_string".
FUNCTION SetFilter
PARAMETERS qry_name
*
RESTORE FROM &qry_name..qwy ADDITIVE
SET FILTER TO &qry_string
RETURN .F.
See Also:
DBRELATION
DBRSELECT
SET FILTER
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson