Dbopen()

From Recital Documentation Wiki
Revision as of 10:12, 2 April 2009 by Yvonnemilne (Talk | contribs)

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

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


SEE ALSO

dbclose(), dbfilemode(), dbiopen(), dbmopen(), dbonerror()