Difference between revisions of "Dbunlockf()"
From Recital Documentation Wiki
Yvonnemilne (Talk | contribs) |
Yvonnemilne (Talk | contribs) |
||
Line 42: | Line 42: | ||
rc = dbunlockf(dbf); | rc = dbunlockf(dbf); | ||
− | if (rc = SUCCESS) printf("file is unlocked! \n"); | + | if (rc == SUCCESS) printf("file is unlocked! \n"); |
else { | else { | ||
printf("error number %d \n", rc); | printf("error number %d \n", rc); |
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()