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 - set scope http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 SET SCOPE
 Set top and bottom SCOPE values to same value
------------------------------------------------------------------------------

 Syntax

     SET SCOPE TO [<value>]

     <value> specifies the index key value of the current index from
     which to view a subset of records. The records visible in the index
     will be limited to the records matching the SCOPE value. Both the
     TOP and BOTTOM scope values are set to <value> using this command,
     providing a tightly focused scope of records.

     If <value> is omitted, the scope is cleared.

 Description

     SET SCOPE  is used to set both the TOP and BOTTOM scopes to the
     same value. SET SCOPE  provides a method of setting a temporary,
     artificial view of the current index, allowing rapid retrieval of
     records.

     The specified scope is active as soon as the rcord pointer is
     repositioned using GO TOP, GO BOTTOM, SEEK or SKIP commands. Using
     GOTO will allow the record pointer to be positioned outside the
     defined scope.

     Scopes exist per index order. That is, each index order in each work
     area can have its own scope. Only the scope on the currently active
     index order in the currently active work area is in effect, however.
     Scopes continue to exist until the scope is cleared (using
     CLEAR SCOPE) or the corresponding index is closed. Changing active
     index orders and/or work areas does not clear a scope; it just changes
     what scope is in effect.

     Note:  If both a narrow SCOPE and a narrow FILTER (narrow meaning
     that only a small percentage of the total records in the table match
     the SCOPE and FILTER conditions) are being used in the same work area,
     poor performance may result.  Since knowledge of SCOPEs is ONLY on
     the client, and since FILTERs are handled on the server, the
     filtering of records on the server may unnecesssarily traverse
     through the index well beyond one of the SCOPE boundaries, thus,
     leading to poor performance.  If this is occurring, it is recommended
     to use either a SCOPE or a FILTER, but not both in the same work area.

 Example

     #include "DBFCDXAX.CH"

     USE test VIA "DBFCDXAX"

     INDEX ON state TAG state

     SET SCOPE TO "AZ"

     // Browse all records from Arizona
     Browse()

     CLEAR SCOPE


See Also: SET SCOPETOP SET SCOPEBOTTOM CLEAR SCOPE AX_SetScope()

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