Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- SIx Driver RDD v3.00 - Reference Guide - <b>m6_filtchgrec():</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  m6_FiltChgRec():

  Purpose:  Either adds or drops a record from a filter based on it's
            current status in the filter.   If the record is in the
            filter it's dropped, otherwise it's added.

   Syntax:  m6_FiltChgRec( <nHandle>, <nRecord> )

    Where:  <nHandle>     --  Is a handle to a previously allocated
                              filter.

            <nRecord>     --  Record to change in the filter

  Returns:  Logical value:  .T. means the operation was successful,  .F.
            indicates it failed.  In the case of a .F. value call m6_Error()
            to retrieve the reason for the error.

     Note:  You do not need to own a filter to change records in it.  What you
            do need is a valid handle to the filter, which can be obtained
            via m6_NewFilter() or m6_GetAreaFilter().

            *Always free RYO filters that are no longer being used.*
  Example:

         #include "SIXCDX.CH"
         #include "MACHSIX.CH"

         //..............................................use customer file
         USE Customer via "SIXCDX"

         //..............................................create RYO filter
         nHandle := m6_NewFilter()

         //......................................add records to the filter
         ? m6_FiltAddRec( nHandle,  5 )  // .T.
         ? m6_FiltAddRec( nHandle, 10 )  // .T.

         //..SET FILTER TO my RYO filter ( Note: System now owns the filter )
         m6_SetAreaFilter( nHandle )

         //...........Browse records, only records 5 and 10 will be visible
         Browse()

         //..Change status of record 5 in the filter ( record will be dropped )
         ? m6_FiltChgRec( nHandle,  5 )   //  .T.

         //..Change status of record 20 in the filter ( record will be added )
         ? m6_FiltChgRec( nHandle, 20 )   //  .T.

         //........................Now only records 10 and 20 will be visible
         Browse()

         //.Free filter via SET FILTER TO ( System will release the filter )
         SET FILTER TO


See Also: m6_FiltAddRec() m6_FiltDropRec() m6_NewFilter() m6_GetAreaFilter() m6_Error()

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