Dbunlockr()

From Recital Documentation Wiki
Revision as of 14:27, 1 April 2009 by Yvonnemilne (Talk | contribs)

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

PURPOSE

unlock a record in a database table file


SYNOPSIS

#include "dbl.h"
 
	int	dbunlockr(dbf, recno)
 
	<input parameter>
	char	*dbf;		/* File descriptor of a .DBF file to be unlocked	*/
	int	recno;		/* Record number to unlock				*/
 
	<output parameter>
	none


RETURN VALUE

The dbunlockr() 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

The dbunlockr() function unlocks a record in the database file from the given file descriptor "char *dbf". The record unlocked is the number in "int recno".


EXAMPLE

The following example unlocks record number 5 in the .DBF file whose file descriptor is in "char *dbf".

#include "dbl.h"
 
	char	*dbf;		/* Database file descriptor	*/
	int	rc;		/* Return code			*/
 
	rc = dbunlockr(dbf, 5);
	if (rc = SUCCESS) printf("record 5 in unlocked n");
	else {
		printf("error number %d n", rc);
		return (ERROR);
	}


SEE ALSO

dbfilemode(), dblockf(), dblocki(), dblockr(), dbtlockf(), dbtlockr(), dbunlockf(), dbunlocki()