Difference between revisions of "DBF LOCKF()"
From Lianjapedia
Yvonne.milne (Talk | contribs) m (1 revision) |
Yvonne.milne (Talk | contribs) m (Text replace - "lianjaapi.h" to "lianja_api.h") |
||
Line 7: | Line 7: | ||
==SYNOPSIS== | ==SYNOPSIS== | ||
<code lang="c"> | <code lang="c"> | ||
− | #include " | + | #include "lianja_api.h" |
int DBF_LOCKF() | int DBF_LOCKF() | ||
Line 29: | Line 29: | ||
<code lang="c"> | <code lang="c"> | ||
− | #include " | + | #include "lianja_api.h" |
lianjaapi_dbf_lockf() | lianjaapi_dbf_lockf() |
Latest revision as of 06:56, 11 April 2013
PURPOSE
Lock a table
SYNONYM
api_dbf_lockf()
SYNOPSIS
#include "lianja_api.h" int DBF_LOCKF() <input parameters> none <output parameters> none
DESCRIPTION
The DBF_LOCKF() function will lock the table in the current cursor. A value of -1 will be returned if there is no table open in the current cursor.
The file lock will be issued on the shared table when no other user has a file or record lock current.
The table will still be opened shared for readonly access for other users however they will not be able to update any records until you release the file lock.
EXAMPLE
The following example locks the current table.
#include "lianja_api.h" lianjaapi_dbf_lockf() { int locked; if (DBF_ISEXCLUSIVE() == 0 ) { locked = DBF_LOCKF(); } else { locked = -1; } _retl( (locked >= 0) ? 1 : 0 ); }
SEE ALSO
BLOB_UPDATE(), BLOB_WRITE(), DBF_APPEND(), DBF_DELETE(), DBF_ISEXCLUSIVE(), DBF_ISREADONLY(), DBF_LOCKR(), DBF_RECALL(), DBF_UNLOCKF(), DBF_UNLOCKR(), DBF_UPDATE(), FIELD_UPDATE(), MEMO_UPDATE(), MEMO_WRITE()