
Click above to get retro games delivered to your door ever month!
X-Hacker.org- SIx Driver RDD v3.00 - Reference Guide - <b>hs_ifdel():</b>
[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
hs_IfDel():
Purpose: Determines if a HiPer-SEEK record has been marked as deleted.
Syntax: hs_Ifdel( <hIndex>, <nVal> )
Where: <hIndex> is an integer handle of a HiPer-SEEK index file.
<nVal> is an integer representing the record number to be tested.
Returns: Returns 1 ( TRUE ) if the specified record is marked as deleted.
If not, returns 0 ( FALSE ). A negative return value indicates
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.
-16 (BADPARMS) Invalid parameters were passed to the function.
-18 (BADHANDLE) Invalid handle was passed to the function.
Example:
USE sales EXCL
h := hs_Open( "SALES.HSX", 20, 1 )
DO WHILE !eof()
IF Deleted() // If DBF record is deleted
IF hs_IfDel( h, RecNo() ) == 0 // And HiPer-SEEK record is not
nVal := hs_Delete( h, RecNo() ) // Delete it in HiPer-SEEK index
IF nVal < 1
? "Error adding record " + LTrim( Str( RecNo() )) + "!"
ENDIF
ENDIF
ENDIF
SKIP
ENDDO
See Also: hs_Delete() hs_UnDelete()
Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson