Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Artful Two for Clipper 5.0 - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

Syntax

ADDREC()  (single-user)

ADDREC( [ nWait[, lAsk ]] )  (multi-user)

Purpose

Multi-user transparency for appending blanks. Single-user:
Append a blank. Multi-user: Continue trying to append a blank
until NETERR() returns .F. or until the user cancels.

Arguments (multi-user only)

     nWait -- If passed, no. of seconds to keep
                  trying, else 5.

     lAsk -- If passed, logical indicating whether to ask if user
                 wishes to wait longer if nWait passes without
                 a successful lock, else .T.

Setup

A table must be selected.

Example

     IF ADDREC()
         REPLACE_EM( Datafield, mDatafield )
         UNLOCK           && Needed if multi-user
     ENDIF

Returns

.T. if successful, otherwise .F.

Side Effects

Appends a blank record if successful. In multi-user mode, the new record is
locked until an UNLOCK command is issued, or until the same user issues
another LOCK command on the same file.

Artful Calls

POP_MSG, VERIFY

Internal calls:  SETNETWAIT

Source Files

AA_ADREC.PRG, AM_LOCKS.PRG

Notes

Note that in multi-user mode you must UNLOCK the current record after your
APPEND/REPLACE transaction, as shown in the example.

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