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>hs_undelete():</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  hs_Undelete():

  Purpose:  Assuming that the index record <nVal> has been previously
            deleted by hs_Delete(), this function unmarks the record as
            being deleted. It is assumed that there has been no change to
            the string which was originally used as indexing text.

   Syntax:  hs_Undelete( <hIndex>, <nVal> )

    Where:  <hIndex> is an integer handle of a HiPer-SEEK index file.

            <nVal> is a integer representing the record number to be
              undeleted.

  Returns:  1 if successful or a negative integer indicating an error.

  Errors Returned:

      -4 (BADSEEK) Error while attempting seek during buffer flushing.
      -5 (BADREAD) System generated a read error while reading.
      -6 (BADWRITE) Error while attempting write during buffer flush.
      -7 (RECBOUND) <nVal> is not valid. It is either too low or
         greater than the total number of records indexed.
      -9 (NOTDELETED)  Specified record number is not marked as
         deleted.
     -16 (BADPARMS) Invalid parameters were passed to the function.

  Comments:

    1.  It is the responsibility of the user to insure that for any
    undeleted record that the string originally used to create the index
    entry (<cExpr> argument in either hs_Add() or hs_Replace()) has not
    changed during the time the record has been deleted.  Otherwise,
    hs_Next() will find all records containing the old, rather than new
    value. If the contents of the string has changed, use hs_Replace()
    instead.

  Example:

    USE test EXCL
    h := hs_Open( "NAMES.HSX", 16, 1 )
    DO WHILE !eof()
      IF deleted()
        RECALL
        IF hs_Ifdel( h, RecNo() ) == 1
          IF hs_Undelete( h, RecNo() ) < 1
            ? "HiPer-SEEK undelete error: " + LTrim( Str( recno() ))
          ENDIF
        ENDIF
      ENDIF
      SKIP
    ENDDO
    hs_Close( h )



See Also: hs_Delete() hs_IfDel() hs_Replace()

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