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 - aoffilttofile() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 aofFiltToFile()
 Saves a Client Advantage Optimized Filter to a file
------------------------------------------------------------------------------

Syntax

     aofFiltToFile( <nHandle>, <cFileName> ) -> logical

     <nHandle>  Handle to an existing filter.

     <cFileName>  Path and file name to store the filter in. If this
     file already exists, it will get overwritten.

Returns

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

Description

     aofFileToFilter() saves the filter to a file. This function is
     useful when you want to archive the status of a filter for future
     filter operations. The function will NOT destroy the specified
     filter. The specified filter will remain in existence after
     aofFiltToFile() is called.

Example

     USE Customer VIA "DBFCDXAX" INDEX state

     // Create a user-owned filter
     nHandle := aofCreateFilter( `State = "CA"' )

     // Save the filter to a file
     aofFiltToFile( nHandle, "Save.flt" )

     // Re-open customer.dbf without any indexes
     USE Customer

     // Restore the filter from the file
     nHandle := aofFileToFilter( "Save.flt" )

     // Change the filter to a system-owned filter
     aofFiltToSystem( nHandle )

     // Browse the table.  Only records in "CA" will be visible
     Browse()


See Also: aofFileToFilter()

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