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>set recheck:</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  SET RECHECK:

  Syntax:

  SET RECHECK ON/OFF/<lExp>

  ON forces the non-optimizable portion of a filter condition to
     be re-tested against each record found to meet the optimizable
     portion.

  OFF disables re-testing. This is the default.

  <xlToggle> is a logical expression that must be enclosed in parentheses.
  A value of true (.T.) is the same as ON, and a value of false (.F.) is
  the same as OFF.

  Description:

  The RECHECK command allows you to control the re-testing of the
  partially optimizable portions of a filter condition with each
  optimizable record.  By default, records found not meeting the partially
  optimizable portion of the query are eliminated from the filter record
  list.  This process of eliminating records will actually increase
  performance as you move throughout the file.

  ---------------------------------| EXAMPLE |--------------------------------
  /*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  *  Demonstrates the SET RECHECK command                                 *
  *::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/

  #include "SIXCDX.CH"
  #include "MACHSIX3.CH"

  USE Test VIA "SIXCDX"

  //........................................create index to optimize filter
  INDEX ON State TO State

  //................................Set order to 0 for the best performance
  SET ORDER TO 0

  //......................................................Set re-checking on
  SET RECHECK ON

  //..............Set a filter condition. Note: "Married" is not optimizable
  SET FILTER TO State = "CA" .AND. Married

  //...............Traverse the database to visit all records in the filter
  GO TOP
  nCount:=0
  DO WHILE !Eof()
    nCount++
    SKIP
  ENDDO

  //...............................Get information about the current filter
  aInfo:= m6_FiltInfo()

  //..Display number records in filter list.  This is the number that = "CA"
  ? "Number of records in filter list ="
  ?? aInfo[ INFO_COUNT ]                                           // 4

  //...............Now display the number of records actually in the filter.
  ? "Number of records meeting filter condition ="
  ?? nCount                                                        // 2


  //................Set recheck off to eliminate records in the filter list
  SET RECHECK OFF

  //.......................................Visit all records one more time
  GO TOP
  DO WHILE !Eof()
    SKIP
  ENDDO

  //.......................................Get information about the filter
  aInfo:= m6_FiltInfo()

  //....................Note two records were removed from the filter list
  ? "Number of records in filter list="
  ?? aInfo[ INFO_COUNT ]                                          // 2

  !seealso: sx_func.eho:m6_FiltInfo()



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