DtvLong dal_dbi_lck_elm (idn, tab, mrk)

Creates a lock entry in the data base for the record passed and detects, whether for the passed record a lock entry already exists.

Input Parameters Significance
DtvLong idn ident number of the record
char *tab name of the original table of the record
DtvLong mrk lock marking Id

Output Parameters Significance
no -

Return Code Significance
0 no error
1 record is already locked
2 error opening the lock log file

If you use userexits to execute your own manipulations at records in the data base, you have to assure the consistency of the data base from within the userexit using this function. If a record is locked, it cannot be edited or deleted from any other DataView user.

The lock marking Id is used to group locked records. DataView itself uses the widget Id as lock marking Id.

Using the function dal_dbi_fre_lck you can remove all locks you grouped via the same lock marking Id.

Locking is additionally logged in the user lock file of the DataView < lck> directory.