Difference between revisions of "Dbrecall()"

From Recital Documentation Wiki
Jump to: navigation, search
 
 
Line 11: Line 11:
  
 
<input parameters>
 
<input parameters>
char *dbf; /* .DBF file descriptor */
+
char *dbf; /* .DBF file descriptor */
long recno; /* Record number */
+
long recno; /* Record number */
  
 
<output parameter>
 
<output parameter>
Line 38: Line 38:
 
#include "dbl.h"
 
#include "dbl.h"
  
char *dbf; /* .DBF file descriptor */
+
char *dbf; /* .DBF file descriptor */
int rc; /* Return code */
+
int rc; /* Return code */
  
 
rc = dbrecall(dbf, 15);
 
rc = dbrecall(dbf, 15);
if (rc = = SUCCESS) printf("record recalled n");
+
if (rc == SUCCESS) printf("record recalled \n");
 
else {
 
else {
printf("error number %d n", rc);
+
printf("error number %d \n", rc);
 
exit (1);
 
exit (1);
 
}
 
}

Latest revision as of 14:19, 1 May 2009

PURPOSE

recall a previously deleted record


SYNOPSIS

#include "dbl.h"
 
	int	dbrecall(dbf, recno)
 
	<input parameters>
	char	*dbf;		/* .DBF file descriptor */
	long	recno;	/* Record number */
 
	<output parameter>
	none


RETURN VALUE

The dbrecall() 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 recalls or restores the ACTIVE status of a record that has been previously marked deleted.


EXAMPLE

This example recalls the 15th record in the .DBF file whose file descriptor is in "char *dbf"


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


SEE ALSO

dbdcache(), dbdelete(), dbflush(), dbgetr()