Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper 5.2 . The Guide To CA-Clippe - <b>dbdelete()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 DBDELETE()
 Mark a record for deletion
------------------------------------------------------------------------------
 Syntax

     DBDELETE() --> NIL

 Returns

     DBDELETE() always returns NIL.

 Description

     DBDELETE() marks the current record as deleted.  Records marked for
     deletion can be filtered using SET DELETED or removed from the file
     using the PACK command.

     DBDELETE() performs the same function as the standard DELETE command
     with a scope of the current record.  For more information, refer to the
     DELETE command.

 Notes

     .  Logical records: If the global _SET_DELETED status is true
        (.T.), deleted records are not logically visible.  That is, database
        operations which operate on logical records will not consider records
        marked for deletion.  Note, however, that if _SET_DELETED is true
        (.T.) when the current record is marked for deletion, the record
        remains visible until it is no longer the current record.

     .  Network environment: For a shared database on a network,
        DBDELETE() requires the current record to be locked.  For more
        information, refer to the Network Programming chapter of the
        Programming and Utilities guide.

 Examples

     .  The following example deletes a record after a successful
        record lock:

        cLast := "Winston"
        DBUSEAREA( .T., "DBFNTX", "Sales", "Sales", .T. )
        DBSETINDEX( "LASTNAME" )
        //
        IF ( Sales->(DBSEEK(cLast)) )
           IF Sales->( RLOCK() )
              Sales->( DBDELETE() )
              ? "Record deleted: ", Sales( DELETED() )
           ELSE
              ? "Unable to lock record..."
           ENDIF
        ELSE
           ? "Not found"
        ENDIF

 Files:  Library is CLIPPER.LIB.

See Also: DBRECALL() DELETE RECALL

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