Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide To Clipper - <b>append blank</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
APPEND BLANK


Syntax:     APPEND BLANK

Purpose:    To add a new record to the end of the currently selected
            database file.

Usage:      APPEND BLANK adds a blank record and makes it the current
            record.

Network:    When operating under a network and the current database file
            is shared, APPEND BLANK attempts to add and then lock a new
            record.  If another user has locked the database file with
            FLOCK() or locked LASTREC() + 1 with RLOCK(), NETERR()
            returns true (.T.).  Note that a newly APPENDed record
            remains locked until you lock another record or perform an
            UNLOCK.  Note also that APPENDing BLANK does not release an
            FLOCK() by the current user.

Library:    CLIPPER.LIB


----------------------------------- Example --------------------------------

   USE Sales

   ? FIELD(1)                     && Result: Salesman
   ? LASTREC()                    && Result: 83

   APPEND BLANK
   ? LASTREC()                    && Result: 84

   name = FIELD(1)
   ? EMPTY(&name.)                && Result: .T.

------------------------------- Network Example ----------------------------

   This example APPENDs a BLANK record if NETERR() does not return true
   (.T.):

   SET EXCLUSIVE OFF
   IF Net_use("Accounts", .F., 5)      && USE succeeds.
      APPEND BLANK
      IF NETERR()
         ? "Not available"
      ELSE
         <process new record>...
      ENDIF
   ENDIF


See Also: APPEND FROM Add_rec()

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