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>dbrecall()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 DBRECALL()
 Reinstate a record marked for deletion
------------------------------------------------------------------------------
 Syntax

     DBRECALL() --> NIL

 Returns

     DBRECALL() always returns NIL.

 Description

     DBRECALL() causes the current record to be reinstated if it is marked
     for deletion.

     DBRECALL() performs the same function as the RECALL command.  For more
     information, refer to the DELETE and RECALL commands.

 Notes

     .  Logical records: Reinstating a deleted record affects the
        record's logical visibility if the global _SET_DELETED status is true
        (.T.).  For more information, refer to the DBDELETE() function and
        the DELETE and RECALL commands.

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

 Examples

     .  The following example recalls a record if it is deleted and
        attempts to lock the record if successful:

        cLast := "Winston"
        DBUSEAREA( .T., "DBFNTX", "Sales", "Sales", .T. )
        DBSETINDEX( "LASTNAME" )
        //
        IF ( Sales->(DBSEEK(cLast)) )
           IF Sales->( DELETED() )

              IF Sales( RLOCK() )
                 Sales( DBRECALL() )
                 ? "Record recalled"
              ELSE
                 ? "Unable to lock record..."
              ENDIF
           ENDIF
        ELSE
           ? "Not found"
        ENDIF

 Files:  Library is CLIPPER.LIB.

See Also: DBDELETE() DELETE RECALL

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