C5_DBRECALL

 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



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.