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 scopebottom http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 SET SCOPEBOTTOM
 Set the bottom index SCOPE value
------------------------------------------------------------------------------

 Syntax

     SET SCOPEBOTTOM TO [<value>]

     <value> specifies the lower index key value of the current index to
     which to view a subset of records.  A lower boundary value, denoted as
     TOP, is used to establish the upper range of visible records within the
     current index.

     If <value> is omitted, the BOTTOM scope is cleared and the actual top
     of the index is assumed.  For example, if SET SCOPEBOTTOM is the
     only scope defined, the visible index records will start at the top of
     the index file and proceed to the BOTTOM scope value.

 Description

     SET SCOPEBOTTOM is used to set the BOTTOM scope to specific index key
     values.  The value determines the lower limit by which to view the
     index records.  SET SCOPEBOTTOM sets the starting key value
     (inclusive).  The SCOPE commands are designed to emulate the actual
     TOP and BOTTOM of the current index.  This means descending indexes
     will have a higher SCOPETOP than SCOPEBOTTOM value.

     Advantage SCOPE commands and functions allow you to view a subset of
     records in an index.  bottom and top index key limits are defined to
     retrieve only those records that fit within the specified SCOPE range.
     The range acts as a temporary view of an index, allowing rapid
     retrieval of only those records meeting the SCOPE range value(s). The
     range values are determined based on the current index.

     The specified scope is active as soon as the record pointer is
     repositioned using GO TOP, GO BOTTOM, SEEK or SKIP commands.  Using
     the GOTO command 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.

     Advantage SCOPE commands are not to be confused with CA-Clipper
     <scopes>.  Advantage SCOPES are used to view a subset of records in
     an existing index; CA-Clipper <scopes> are used to build a new index
     based upon a subset of table records.

     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"      // Open TEST.DBF

     INDEX ON age TAG age         // Create and index on the AGE field

     SET SCOPETOP TO 21           // Sets the top SCOPE value to 21
     SET SCOPEBOTTOM TO 30        // Sets the bottom SCOPE value to 30

     Browse()                     // Browse records within the scope

     CLEAR SCOPE                  // Clears the SCOPE


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

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