Dbclose()
From Recital Documentation Wiki
Revision as of 15:48, 3 April 2009 by Yvonnemilne (Talk | contribs)
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); }