Dbdcache()
From Recital Documentation Wiki
Revision as of 12:48, 1 May 2009 by Yvonnemilne (Talk | contribs)
PURPOSE
specify the database cache size
SYNOPSIS
#include "dbl.h" int dbdcache(size) <input parameters> int size; /* Database cache size in records */ <output parameters> none
RETURN VALUE
The dbdcache() function returns 0 for success. See the section on return code values for a detailed list of return codes.
DESCRIPTION
The dbdcache() function specifies the amount of records to be cached in memory.
EXAMPLE
This example sets the database cache to the total number of records stored in the database specified in the file descriptor stored in "char *dbf".
#include <dbl.h char *dbf; /* .DBF file descriptor */ long dbsize; /* Size of the .DBF file */ int rc; /* Return code */ rc = dbsize(dbf, &dbsize); if (rc == SUCCESS) dbdcache(dbsize); else { printf("error number %d \n", rc); exit (1); }
SEE ALSO
dbflush(), dbgetnr(), dbgetr(), dbgetrk(), dbicache(), dbrecall()