Dbopen()
From Recital Documentation Wiki
Revision as of 10:13, 2 April 2009 by Yvonnemilne (Talk | contribs)
PURPOSE
open an existing .DBF file
SYNOPSIS
#include "dbl.h" int dbopen(dbfname, dbf) <input parameter> char *dbfname; /* Address of a buffer containing the name of a .DBF file to be opened */ <output parameter> char *dbf; /* The .DBF file descriptor */
RETURN VALUE
The dbopen() 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 opens a .DBF file and returns its file descriptor. A call to the dbclose() function releases the file descriptor for use by some other .DBF file.
EXAMPLE
The following example opens a .DBF file "LIBRARY.DBF" and stores its file descriptor in "char *dbf".
#include "dbl.h" char *dbf; /* .DBF file descriptor */ int rc; /* Return code */ rc = dbopen("library.dbf", &dbf); if (rc = = SUCCESS) printf("database file open n"); else { printf("error number %d n", rc); exit (1); }