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>cftsreplac( <cftshandle>, <expc>, <expn> )</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   CftsReplac( <CFTShandle>, <expC>, <expN> )

       Purpose

   Replaces the current index entry for <expN> with the new value of 
   <expC>. There must be at least <expN> records already indexed.

       Parameters

   <CFTShandle> is an integer referring to a CFTS index. <expC> is a 
   string containing the data to be indexed. There is no length limit to 
   the index string, however, strings of length 100 to 4000 characters 
   (or less) usually provide a satisfactory alias rate. Strings longer 
   than this can result in higher than acceptable alias rates. <expN> is 
   an integer representing the record number to be replaced.

       Return Value

   Returns 1 if successful, else error value (see below).

       Errors Returned

    -4   (BADSEEK): Error while attempting seek.
    -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. Test
                     the actual value being supplied as <expN>. If the 
                     record pointer is set to point past the last record
                     in the .DBF file (by using a SKIP command to skip past
                     the last record), Clipper's RECNO() returns 
                     LASTREC() + 1. This value will result in a  
                     -7 (RECBOUND) error if used as the <expN>
                     parameter to CftsReplac().
   -16  (BADPARMS): Invalid parameters were passed to the function.
   -18  (BADHANDLE): Invalid handle was passed to the function.

       Comments

   None.

       Example

   .
   .
   .
   use sales
   xhandle = CftsOpen( 'sales.ia', 20, .T. )
   goto 10                                           && get record 10
   instring = trim( field1 ) + ' ' + trim( field2 ) + ' ' + ...
   result = CftsReplac( xhandle, instring, recno() )
   if result <1
      ? 'error updating CFTS index on record # ' + str( recno() )
   endif
   .
   .
   .

See Also: -7 RECBOUND

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