SP_SEARCHMRS

SEARCHMRS()

  Short:
  ------
  SEARCHMRS() Resets all SEARCHME() settings

  Returns:
  --------
  NIL

  Syntax:
  -------
  SEARCHMRS([)

  Description:
  ------------
  Resets all SEARCHME() static variables
    - sets found() flag to FALSE
    - sets locate block to nil
    - sets continue flag to .f.
    - sets ALIAS to nil

  For instance, if you change datafiles - you need to reset
  SEARCHME() with SEARMRS()

  Examples:
  ---------
  SEARCHMRS()

  Source:
  -------
  S_SEARCH.PRG

 

SP_SEARCHMFND

SEARCHMFND()

  Short:
  ------
  SEARCHMFND() Set/return last found() status from SEARCHME()

  Returns:
  --------
  <lFound> -> Last searchme found() status

  Syntax:
  -------
  SEARCHMFND([lSet])

  Description:
  ------------
  Sets/retrieves the last found() setting for SEARCHME()
  [lSet] optionally sets the found() flag.

  For instance, to find out what the last result of SEARCHME() was
  so you can take an action or not based on something being found,
  use SEARCHMFND() to retrieve the last result.

  Examples:
  ---------
  SEARCHMFND(.f.)

  Source:
  -------
  S_SEARCH.PRG

 

SP_SEARCHME

SEARCHME()

  Short:
  ------
  SEARCHME() Search a DBF with user-specified criteria

  Returns:
  --------
  <bSearch> -> The code block used to do the search

  Syntax:
  -------
  SEARCHME([aField,aFieldTypes,aFieldLengths],[aFieldDesc])

  Description:
  ------------
  Searches the current dbf with criteria given

  by the user.

       for :    Field Contents Match
                Query match  --->> calls QUERY()
                End of file
                Beginning of File
                Deleted Records
                Memo contents

  On subsequent calls, if the previous search resulted
  in a FOUND(), a box asking "Continue..", "New Search" will pop up.
  If CONTINUE is selected, a continuation of the last search is
  done.

  Three arrays may be passed for FIELDS [aFields],
  FIELD TYPES [aFieldTypes], and FIELD LENGTHS [aFieldLengths].

  An additional (optional) array of field descriptions may be passed

  Default is all fields, field names as descriptions.

  Searchme() actually returns the code block used to do the
  search. Normally you would want to ignore this. I use it in
  TAGIT() - if the code block is not NIL, then I can 'tag all
  matching' with it.

  Examples:
  ---------
  SEARCHME()

  Source:
  -------
  S_SEARCH.PRG

 

SP_DUPLOOK

DUPLOOK()

  Short:
  ------
  DUPLOOK() Locates possible duplicates based on user criteria

  Returns:
  --------
  nothing

  Syntax:
  -------
  DUPLOOK([cInfo],[aIndexes])

  Description:
  ------------
  Searches current dbf for exact duplicates of field(s)
  selected by user. User picks a field or fields, DUPLOOK()
  creates an index and prepares a possible duplicates report.

  [cInfo] is a character expression as additional info
  for each report line printed. (report normally only refers to
  record# and the fields selected )

  [aIndexes] is an array of currently open index files
  to be reopened on exit from duplook() (up to 10)

  Examples:
  ---------
   aIndexOpen := {"CUSTOMER","STATE","ZIPCODE"}
   DUPLOOK("Lastname+'  '+Firstname",aIndexOpen)
   * the fields the user picks to check duplicates
   * on,the LASTNAME and FIRSTNAME fields are also
   * printed on the report.
   Sample Output:
   Record #    FNAME
       1   GARRY
       2   GARRY

  Warnings:
  ----------
  THIS FUNCTION CLOSES ANY OPEN INDEXES YOU WILL NEED
  TO RE-OPEN INDEXES ON EXIT. (UNLESS YOU PASS AN ARRAY OF OPEN
  INDEXES AS ABOVE...)

  Source:
  -------
  S_DUP.PRG

 

SP_DBSTATS

DBSTATS()

  Short:
  ------
  DBSTATS() Statistical report on dbf, including
  sum/avg/min/max/std/var/count

  Returns:
  --------
  Nothing

  Syntax:
  -------
  DBSTATS()

  Description:
  ------------
  This is a point & shoot metafunction which allows the
  user to get statistical data on a dbf, particularly with
  numeric fields.

  Statistics available are: count, sum, average,
  minimum, maximum, variance and standard deviation. the analysis
  may also be based on a conditional criteria.

  Examples:
  ---------
   use (cDbfName)

   DBSTATS()    // its a menu driven metafunction

  Source:
  -------
  S_DBSTAT.PRG