Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide To Clipper - <b>dbfilter()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
DBFILTER()


Syntax:     DBFILTER()

Purpose:    To determine the expression of the active filter in the
            current work area.

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 ("").

Library:    CLIPPER.LIB


----------------------------------- 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: SET FILTER DBRELATION() DBRSELECT()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson