Dbclose()

From Recital Documentation Wiki
Revision as of 11:30, 1 May 2009 by Yvonnemilne (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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);
	}


SEE ALSO

dbiclose(), dbopen()