Navigation:  Reference > Functions >

RecordLock()

Print this Topic Previous pageReturn to chapter overviewNext page

 

REC_LOCK(2)

 

PURPOSE

This function will attempt to lock, or unlock, a record in a file opened with Opportunistic locking.  Use this function to lock records only when necessary.  This will allow the user to browse records in a data base without locking a record until changes are to be made.  You can also unlock an active record.

 

PARTS

1 f/c/eRequired - The file_number/handle of the file to use.

 

2 f/c/eWhat to do

       recLock - Lock the record - This is the default value.

       recUnlock - Unlock the record.

 

RETURN TYPE - L

If the function is successful it will return .T., if not it will return .F.

 

COMMENTS

The file must have been opened with the OPENV command and the LOCK option must be set to O.  A record must be active when the function is called or a False value will be returned.

 

NOTE:  Once the record is locked the actual record is read again from disk to make sure the most current version is in memory.  Users should not be allowed to make changes until the record is locked.

 

SEE ALSO

LCKD()

 

 


Page url: http://www.cassoftware.com/tas/manual/lockrecord().htm