Difference between revisions of "Dbunlockf()"
From Recital Documentation Wiki
Yvonnemilne (Talk | contribs) |
Yvonnemilne (Talk | contribs) |
||
(One intermediate revision by one user not shown) | |||
Line 11: | Line 11: | ||
<input parameter> | <input parameter> | ||
− | char *dbf; /* File descriptor of a .DBF file to be unlocked */ | + | char *dbf; /* File descriptor of a .DBF file to be unlocked */ |
<output parameter> | <output parameter> | ||
Line 38: | Line 38: | ||
#include "dbl.h" | #include "dbl.h" | ||
− | char *dbf; /* Database file descriptor */ | + | char *dbf; /* Database file descriptor */ |
− | int rc; /* Return code | + | int rc; /* Return code */ |
rc = dbunlockf(dbf); | rc = dbunlockf(dbf); | ||
− | if (rc = SUCCESS) printf("file is unlocked | + | if (rc == SUCCESS) printf("file is unlocked! \n"); |
else { | else { | ||
− | printf("error number %d n", rc); | + | printf("error number %d \n", rc); |
return (ERROR); | return (ERROR); | ||
} | } |
Latest revision as of 15:49, 1 May 2009
PURPOSE
unlock a database file
SYNOPSIS
#include "dbl.h" int dbunlockf(dbf) <input parameter> char *dbf; /* File descriptor of a .DBF file to be unlocked */ <output parameter> none
RETURN VALUE
The dbunlockf() function returns 0 for success, or < 0. See the section on return code values for a detailed list of return codes.
DESCRIPTION
The dbunlockf() function unlocks the database file from the given file descriptor "char *dbf".
EXAMPLE
The following example unlocks the .DBF file whose file descriptor is in "char *dbf".
#include "dbl.h" char *dbf; /* Database file descriptor */ int rc; /* Return code */ rc = dbunlockf(dbf); if (rc == SUCCESS) printf("file is unlocked! \n"); else { printf("error number %d \n", rc); return (ERROR); }
SEE ALSO
dbfilemode(), dblockf(), dblocki(), dblockr(), dbtlockf(), dbtlockr(), dbunlocki(), dbunlockr()