
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>append blank</b>
[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
APPEND BLANK
Add a new record to the current database file
------------------------------------------------------------------------------
Syntax
APPEND BLANK
Description
APPEND BLANK is a database command that adds a new record to the end of
the current database file and then makes it the current record. The new
field values are initialized to the empty values for each data type:
character fields are assigned with spaces; numeric fields are assigned
zero; logical fields are assigned false (.F.); date fields are assigned
CTOD(""); and memo fields are left empty.
If operating under a network with the current database file 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. APPEND BLANK does not release an FLOCK() set by the current
user.
Examples
. This example attempts to add a record to a shared database
file and uses NETERR() to test whether the operation succeeded:
USE Sales SHARED NEW
.
. <statements>
.
APPEND BLANK
IF !NETERR()
<update empty record>...
ELSE
? "Append operation failed"
BREAK
ENDIF
Files: Library is CLIPPER.LIB.
See Also: APPEND FROM FLOCK() NETERR() RLOCK()
Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson