Difference between revisions of "Dbclose()"
From Recital Documentation Wiki
Yvonnemilne (Talk | contribs) |
Yvonnemilne (Talk | contribs) |
||
Line 39: | Line 39: | ||
rc = dbclose(dbf); | rc = dbclose(dbf); | ||
− | if (rc = = SUCCESS) printf("database closed \n"); | + | if (rc == SUCCESS) printf("database closed \n"); |
else { | else { | ||
printf("error number %d \n"); | printf("error number %d \n"); |
Latest revision as of 11:30, 1 May 2009
PURPOSE
close database file
SYNOPSIS
#include "dbl.h" int dbclose(dbf) <input parameter> char *dbf; /* Database file descriptor */ <output parameter> none
RETURN VALUE
The dbclose() function returns 0 for success, or < 0 if an error occurs. See the section on return code values for a detailed list of return codes.
DESCRIPTION
The dbclose() function is used to close the specified database (.DBF) file in the file descriptor.
EXAMPLE
The following example closes a .DBF file whose file descriptor is in "char *dbf;".
#include "dbl.h" char *dbf; /* .DBF file descriptor */ int rc; /* Return code */ rc = dbclose(dbf); if (rc == SUCCESS) printf("database closed \n"); else { printf("error number %d \n"); exit (1); }