Difference between revisions of "Dbiopen()"

From Recital Documentation Wiki
Jump to: navigation, search
Line 26: Line 26:
 
==DESCRIPTION==
 
==DESCRIPTION==
  
This function opens an existing .NDX file and returns its file descriptor.  The file descriptor is released after The dbiclose() function has been called for this file.
+
This function opens an existing .NDX file and returns its file descriptor.  The file descriptor is released after The [[dbiclose()]] function has been called for this file.
  
  

Revision as of 10:32, 2 April 2009

PURPOSE

open an existing index file


SYNOPSIS

#include "dbl.h"
 
	int	dbiopen(name, ndx)
 
	<input parameter>
	char	*name;		/* Address of a buffer containing the .NDX file name	*/
 
	<output parameters>
	char	*ndx;		/* .NDX file descriptor			*/


RETURN VALUE

The dbiopen() function returns 0 for success, or < 0 if an error occurs. See the section on return value codes for a detailed list of failure codes.


DESCRIPTION

This function opens an existing .NDX file and returns its file descriptor. The file descriptor is released after The dbiclose() function has been called for this file.


EXAMPLE

The following example opens the .NDX file "person.ndx". The file descriptor is returned by the function dbiopen() in "char *ndx".

#include "dbl.h"
 
	char	*ndx;		/* .NDX file descriptor	*/
	int	rc;		/* Return code			*/
 
	rc = dbiopen("person.ndx", &ndx);
	if (rc = = SUCCESS) printf("index opened n");
	else {
		printf("error number %d n", rc);
		exit (1);
	}


SEE ALSO

dbfilemode(), dbicache(), dbiclose(), dbiflsh(), dbopen()