RLock()

RLOCK()

Lock a record in a work area

Syntax

      RLOCK() --> lSuccess

Arguments

(This function has no arguments)

Returns

RLOCK() True (.T.) if record lock is successful; otherwise, it returns false (.F.).

Description

This function returns a logical true (.T.) if an attempt to lock a specific record in a selected or designated work area is successful. It will yield a false (.F.) if either the file or the desired record is currently locked. A record that is locked remains locked until another RLOCK() is issued or until an UNLOCK command is executed. On a Network enviroment the follow command need that the record is locked:

@…GET

DELETE (single record)

RECALL (single record)

REPLACE (single record)

Examples

      nId := 10
      USE testid INDEX testid NEW
      IF testid->( DBSEEK( nId ) )
         IF testid->( RLOCK() )
            DBDELETE()
         ENDIF
      ENDIF
      USE

Compliance

Clipper

Files

Library is rdd

Seealso

FLOCK()

Advertisements

3 responses to “RLock()

  1. Pingback: Harbour All Functions – R | 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