Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FAST TEXT SEARCH for Clipper v.2.0 - <b>cftsundel( <cftshandle>, <expn> )</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  CftsUndel( <CFTShandle>, <expN> )

       Purpose

   Assuming that the index record <expN> has been previously deleted 
   by CftsDelete(), 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.

       Parameters

   <CFTShandle> is an integer referring to a CFTS index.

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

       Return Value

   Returns 1 if successful, else returns an error code.

       Errors Returned

    -4   (BADSEEK): Error while attempting seek.
    -5   (BADREAD): System generated a read error while reading.
    -6   (BADWRITE): Error while attempting write.
    -7   (RECBOUND): <expN> is not valid. It is either too low (<1) 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

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

       Example

   .
   .
   .
   use sales
   xhandle = CftsOpen( 'sales.ia', 20, .T. )
   do while ! eof()
       if deleted()                  && if .DBF record is not deleted
       recall
           if CftsIfdel( xhandle, recno() ) = 1  && and CFTS index record is
               result = CftsUndel( xhandle, recno() )  && deleted, then
                                 && undelete the CFTS index record
               if result <1
                   ? 'error undeleting ' + str( recno() ) + 'in CFTS index'
               endif
           endif
       endif
       skip
   enddo
   .
   .
   .

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