Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

xbSchema Struct Reference

Used to define the fields in a database (DBF file). More...

#include <dbf.h>

List of all members.

Public Attributes

char FieldName [11]
char Type
unsigned char FieldLen
unsigned char NoOfDecs


Detailed Description

Used to define the fields in a database (DBF file).

Generally one would define an xbSchema array to be passed to xbDbf::CreateDatabase() to define the fields in the database.

For example, one might create a declaration as follows:

xbSchema MyRecord[] = { { "FIRSTNAME", XB_CHAR_FLD, 15, 0 }, { "LASTNAME", XB_CHAR_FLD, 20, 0 }, { "BIRTHDATE", XB_DATE_FLD, 8, 0 }, { "AMOUNT", XB_NUMERIC_FLD, 9, 2 }, { "SWITCH", XB_LOGICAL_FLD, 1, 0 }, { "FLOAT1", XB_FLOAT_FLD, 9, 2 }, { "FLOAT2", XB_FLOAT_FLD, 9, 1 }, { "FLOAT3", XB_FLOAT_FLD, 9, 2 }, { "FLOAT4", XB_FLOAT_FLD, 9, 3 }, { "MEMO1", XB_MEMO_FLD, 10, 0 }, { "ZIPCODE", XB_NUMERIC_FLD, 5, 0 }, { "",0,0,0 } };

Note that the last xbSchema in an array must be a "null" entry like the one above:

{ "",0,0,0 }

To indicate the end of the array.


Member Data Documentation

unsigned char xbSchema::FieldLen
 

char xbSchema::FieldName[11]
 

unsigned char xbSchema::NoOfDecs
 

char xbSchema::Type
 


The documentation for this struct was generated from the following file:
Generated on Sat Sep 11 04:01:11 2004 for Xbase Class Library by doxygen 1.3.7