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 v5.5 - aoffiletofilter() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 aofFileToFilter()
 Restores a Client Advantage Optimized Filter from a file
------------------------------------------------------------------------------

Syntax

     aofFileToFilter( <cFileName> ) -> numeric

     <cFileName>  The full path and filename to open and retrieve the
     filter from.

Returns

     A numeric handle to the restored filter. A value of 0 (zero)
     indicates the restoration failed. If aofFileToFilter() failed,
     aofErrorCode() will return information on why the function failed.

Description

     aofFileToFilter() creates a user-owned filter from a filter stored
     in a file.

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: aofFiltToFile()

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