Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- SuperLib 3.50 - function isnotdup() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FUNCTION ISNOTDUP()

  Short:
  ------
  ISNOTDUP() Checks for a duplicate field

  Returns:
  --------
  <lDup>  => is duplicate field

  Syntax:
  -------
  ISNOTDUP(expCurrent,[nOrder],[bCompare],;
        [lBlankOk],[nExceptRec],[cMsg])

  Description:
  ------------
  Looks in the current DBF for <expCurrent> - an
  expression of any type. [nOrder]  is the index order to SEEK on.
  Default is INDEXORD(). [bCompare]  - in lieu of an index key,
  this block is used in a locate compare of <expCurrent> as in

  LOCATE FOR eval(bCompare)==expCurrent.

  [lBlankOk]    if <expCurrent> is blank, and this is
  .f. (the default), then and automatic .f. is returned.

  [nExceptRec]  if this is passed, will check all BUT
  this record number. Useful for editing routine, where you don't
  wish to check for a duplicate of the existing record.

  [cMsg]  the message displayed if a duplicate is
  found. Default is none.

  Examples:
  ---------

   @6,0 GET V6 valid   ;
    ISNOTDUP(v6,nil,nil,nil,nil,"Duplicate found")

   @6,0 GET V6 valid   ;
    ISNOTDUP(v6,3,nil,nil,recno(),"Duplicate found")

   @6,0 GET V6 valid  ;
     ISNOTDUP(v6,nil,{||afile->v6},nil,recno(),"Duplicate found")

  Notes:
  -------
  Normally for use in making sure a duplicate record is
  not entered.

  Source:
  -------
  S_NOTDUP.PRG


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