Dbflush()

From Recital Documentation Wiki
Jump to: navigation, search

PURPOSE

flush I/O buffer for .DBF file


SYNOPSIS

#include "dbl.h"
 
	int	dbflush(dbf)
 
	<input parameter>
	char	*dbf;		/* .DBF file descriptor	*/
 
	<output parameters>
	none


RETURN VALUE

The dbflush() 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

This function forces the contents of the I/O buffer of the specified .DBF file to be written to the disk.


EXAMPLE

This example flushes the I/O buffer of the .DBF file whose file descriptor is in "char *dbf".


#include "dbl.h"
	char	*dbf;		/* .DBF file descriptor */
	int	rc;		/* Return code */
 
	rc = dbflush(dbf);
	if (rc == SUCCESS) printf("database buffer flushed \n");
	else {
		printf("error number %d \n", rc);
	exit (1);
}


SEE ALSO

dbappend(), dbdcache(), dbdelete(), dbgetr(), dbiflsh(), dbputr(), dbrecall(), dbupdr()