Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Advantage CA-Clipper Guide v6.11 - aofdestroyfilter() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 aofDestroyFilter()
 Destroy a filter saved in memory without restoring it
------------------------------------------------------------------------------

Syntax

     aofDestroyFilter( <cFiltString> ) -> logical

Returns

     Returns .T. if the operation was successful; .F. indicates it failed.
     If aofDestroyFilter() failed, aofErrorCode() will return information
     on why the function failed.

Description

     aofDestroyFilter() allows you to discard a saved filter which has
     previously been constructed by aofSaveFilter(). All saved filters
     constructed by aofSaveFilter() must be either restored (using
     aofRestoreFilter()), or destroyed (using this function).

Example

     USE demo INDEX age
     aofSetFilter( "age = 30" )        // Restrict to the 30's
     cFiltString := aofSaveFilter()    // Save the filter
     aofSetFilter( "age = 31" )        // Set up a new filter
     ? dbFilter()                      // "age = 31"
     LIST age                          // List all the 31's

     // Check if user wants to restore the previous filter
     lGoBack := .f.
     @ 0, 0 SAY "Go back? " GET lGoBack
     READ

     if ( lGoBack )
        aofRestoreFilter( cFiltString ) // Restore the previous filter
        ? dbFilter()                    // "age = 30"
        LIST age                        // Will now be all the 30's
     else
        aofDestroyFilter( cFiltString ) // Just discard the saved filter
     endif


See Also: aofRestoreFilter() aofSaveFilter()

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