[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 DBLookUp()
 Validation lookup routine for GETS.
-------------------------------------------------------------------------------

 Syntax:

     DBLookUp( <xLookUp>, <cDBF>, <cIndex>[, <bFound>][, <bNotFound>] )
     --> <lFound>

 Arguments:

     <xLookUp> is any valid expression which will be used to SEEK in the
     specified database.

     <cDBF> is a character expression representing the database to open.

     <cIndex> is a character expression representing the index to open.

     <bFound> is optional codeblock that would be EVALuated if the lookup
     is successfull.  Useful with the AssignGet() function for stuffing
     values into GETs from a database.  <bFound> must return a logical
     which is then RETURNed from DBLookUp().

     <bNotFound> is an optional codeblock that would be EVALuated if the
     lookup was unsuccessful.  Useful for APPENDing new data to a database
     from a lookup when it does not exist.  <bNotFound> must return a logical
     indicating whether the lookup was successful or not.

 Returns:

     DBLookUp() returns the logical indicating FOUND().

 Description:

     DBLookUp() will open the database specified by <cDBF> with the index
     specified by <cIndex> and SEEK the expression specified by <xLookUp>.
     IF it is FOUND() and a codeblock is set via <bFound>, <bFound> will be
     EVALed.  If it is not FOUND() and a codeblock is set via <bNotFound>,
     <bNotFound> will be EVALed.  ANY DBF TO OPENED BY DBLookUp() THAT IS
     ALREADY OPEN MUST HAVE BEEN DONE IN SHARED MODE (SET EXCLUSIVE OFF).

     DBLookUp() can be used to verify the existance of a value in an indexed
     database.  The optional codeblocks can be used to prompt the user to add
     the new value in the indexed database if not FOUND() or stuff variables
     with values if FOUND().


 Files:  Library is CUACLIP.LIB

See Also: EX1.PRG
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson