Dbcreatx()
From Recital Documentation Wiki
Revision as of 15:54, 3 April 2009 by Yvonnemilne (Talk | contribs)
PURPOSE
create a database, allowing the addition of field descriptions
SYNOPSIS
#include "dbl.h" int dbcreatx(dbname, nofields, fields, flddes[128][26]) <input parameters> char *dbname; /* Database file descriptor */ int nofields; /* Number of fields */ dBFIELD fields; /* Field structure array */ char flddes[128][26]; /* Array for field descriptions */ <output parameters> none
RETURN VALUE
The dbcreatx() function returns 0 upon success. For a description of other possible return error codes, see the return code values section.
DESCRIPTION
The dbcreatx() function performs the same function as The dbcreat() function with the exception that it allows the addition of field descriptions.
EXAMPLE
The following example adds field descriptions stored in the two dimensional array 'flddes[128][26]' to the structure of the database.
#include<dbl.h> char *dbname; /* Database name to create */ int nofields; /* Number of fields */ dBFIELD fields; /* Field structure array */ char flddes[128][26 ]; /* Array for field description */ rc = dbcreatx("test.dbf",7,fields, flddes); if (rc != success ) { printf("Error in creating database: %d\n", rc); exit(1); } else { printf("Database created.\n"); }