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

char xbSchema::FieldName[11]

char xbSchema::Type

unsigned char xbSchema::FieldLen

unsigned char xbSchema::NoOfDecs


The documentation for this struct was generated from the following file:
Generated on Fri Aug 17 03:28:12 2007 for Xbase Class Library by  doxygen 1.5.2