Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Mach SIx v1.1c - Reference Guide - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

  m6_SetFilter():

  Purpose:  Used to filter out records in a database that to do not match
            a specific condition.

   Syntax:  m6_SetFilter( <bFilter>, <cFilter>, <lNoOptimize> )

    Where:  <bFilter>     = Code block containing filter condition
            <cFilter>     = Filter text ( used by Mach SIx )
            <lNoOptimize> = Toggles off automatic optimization

    Note:   SET ORDER TO 0.  Because Mach SIx internally caches filtered
            records in natural record order optimal filter performance will
            be achieved with SET ORDER TO 0.

  Returns:  NIL


  Example:   #include "DBFSIX.CH"
             #include "MACHSIX.CH"

             #define OPTIMIZE_OFF  .T.

             Use Accounts via "DBFSIX"

             bFilter := {|| state == "CA" }
             cFilter := 'state == "CA"'

             //...............................................set the filter
             m6_SetFilter( bFilter, cFilter )
             go top

             //..........................check the filter optimization level
             ? m6_IsFilter()  // 2

             //............................set filter with optimization off
             m6_SetFilter( bFilter, cFilter, OPTIMIZE_OFF )

             //.........................check the filter optimization level
             ? m6_IsFilter()  // 0



See Also: SET FILTER m6_RefreshFilter m6_IsFilter()

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