dbAppend()

 

DBAPPEND()

Appends a new record to a database file.

Syntax

      DbAppend( [<lLock>] ) --> NIL

Arguments

<lLock> Toggle to release record locks

Returns

DbAppend() always returns NIL

Description

This function add a new record to the end of the database in the selected or aliased work area. All fields in that database will be given empty data values – character fields will be filled with blank spaces, date fields with CTOD(‘//’), numeric fields with 0, logical fields with .F., and memo fields with NULL bytes. The header of the database is not updated until the record is flushed from the buffer and the contents are written to the disk.

Under a networking enviroment, DBAPPEND() performs an additional operation: It attrmps to lock the newly added record. If the database file is currently locked or if a locking assignment if made to LASTREC()+1, NETERR() will return a logical true (.T.) immediately after the DBAPPEND() function. This function does not unlock the locked records.

If <lLock> is passed a logical true (.T.) value, it will release the record locks, which allows the application to main- tain multiple record locks during an appending operation. The default for this parameter is a logical false (.F.).

Examples

      PROCEDURE Main()
         LOCAL cName := "HARBOUR", nId := 10
         USE test
         test->( dbAppend() )
         REPLACE test->Name WITH cName, test->Id WITH nId
         USE
         RETURN

Compliance

Clipper

Files

Library is rdd

Seealso

DBUNLOCK(), DBUNLOCKALL()

Advertisements

3 responses to “dbAppend()

  1. Pingback: Harbour All Functions – D | Viva Clipper !

  2. Pingback: Harbour Database Functions | Viva Clipper !

  3. Pingback: Harbour RG Summary | Viva Clipper !

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s