xbDbf Class Reference

xbDbf class More...

#include <dbf.h>

List of all members.

Public Member Functions

 xbDbf (xbXBase *)
 Constructor.
xbShort AppendRecord (void)
 Append the current record to the data file.
xbShort BlankRecord (void)
 Blank the record buffer.
xbLong CalcCheckSum (void)
 Calculate checksum for the current record.
xbShort CloseDatabase (bool deleteIndexes=0)
 Close the dbf file.
xbShort CopyDbfStructure (const char *, xbShort)
 Copy DBF structure.
xbShort CreateDatabase (const char *Name, xbSchema *, const xbShort Overlay)
 Create the dbf file.
xbLong DbfTell (void)
 Return the current position in the dbf file.
xbShort DeleteAllRecords (void)
 Delete all records.
xbShort DeleteRecord (void)
 Delete the current record.
xbShort DumpRecord (xbULong)
 Dump record.
xbLong FieldCount (void)
 Return number of fields.
xbStringGetDbfName (void)
 Return Dbf name.
xbShort GetDbfStatus (void)
 Return status.
xbShort GetFirstRecord (void)
 Get the first physical record in the data file.
xbShort GetLastRecord (void)
 Get the last phyiscal record in the data file.
xbShort GetNextRecord (void)
 Get the next physical record in the data file.
xbShort GetPrevRecord (void)
 Get the previous physical record in the data file.
xbLong GetCurRecNo (void)
 Return current record number.
xbShort GetRecord (xbULong)
 Get a record from the data file.
char * GetRecordBuf (void)
 Return a pointer to the record buffer.
xbShort GetRecordLen (void)
 Return record length.
xbShort NameSuffixMissing (xbShort, const char *)
 Determine if file name suffix is missing.
xbLong NoOfRecords (void)
 Gets the number of records in the data file.
xbLong PhysicalNoOfRecords (void)
 Get the physical number of records in the data file.
xbShort OpenDatabase (const char *)
 Open the DBF file.
xbShort PackDatabase (xbShort LockWaitOption, void(*packStatusFunc)(xbLong itemNum, xbLong numItems)=0, void(*indexStatusFunc)(xbLong itemNum, xbLong numItems)=0)
 Pack the database.
xbShort PutRecord (void)
 Write the current record buffer to the current record in the data file.
xbShort PutRecord (xbULong)
 Write the current record buffer to the specified record in the data file.
xbShort RebuildAllIndices (void(*statusFunc)(xbLong itemNum, xbLong numItems)=0)
 Rebuild all index files.
xbShort RecordDeleted (void)
 Determine if current record is deleted.
void ResetNoOfRecs (void)
 Set number of records to zero????
xbShort SetVersion (xbShort)
 Set dbase version for the dbf file.
xbShort UndeleteAllRecords (void)
 Undelete all records.
xbShort UndeleteRecord (void)
 Undelete the current record.
xbShort Zap (xbShort)
 Delete all records and pack data file.
const char * GetField (xbShort FieldNo) const
 Get the value of the specified field.
const char * GetField (const char *Name) const
 Get the value of the specified field.
xbShort GetField (xbShort FieldNo, char *Buf) const
 Get the value of the specified field.
xbShort GetRawField (const xbShort FieldNo, char *Buf) const
 Get the raw value of the specified field.
xbShort GetField (xbShort FieldNo, char *Buf, xbShort RecBufSw) const
 Get the value of the specified field.
xbShort GetField (const char *Name, char *Buf) const
 Get the value of the specified field.
xbShort GetRawField (const char *Name, char *Buf) const
 Get the raw value of the specified field.
xbShort GetField (const char *Name, char *Buf, xbShort RecBufSw) const
 Get the value of the specified field.
xbShort GetField (xbShort FieldNo, xbString &, xbShort RecBufSw) const
xbShort GetFieldDecimal (const xbShort)
 Returns the number of decimals in the specified field.
xbShort GetFieldLen (const xbShort)
 Returns the length of the specified field.
char * GetFieldName (const xbShort)
 Returns the name of the specified field.
xbShort GetFieldNo (const char *FieldName) const
 Returns the field number of the specified field.
char GetFieldType (const xbShort FieldNo) const
 Returns the type of the specified field.
xbShort GetLogicalField (const xbShort FieldNo)
 Get the logical value of the specified field.
xbShort GetLogicalField (const char *FieldName)
 Get the logical value of the specified field.
char * GetStringField (const xbShort FieldNo)
 Get the string value of the specified field.
char * GetStringField (const char *FieldName)
 Get the string value of the specified field.
xbShort PutField (const xbShort, const char *)
 Put a value into the specified field.
xbShort PutRawField (const xbShort FieldNo, const char *buf)
 Put a raw value into the specified field.
xbShort PutField (const char *Name, const char *buf)
 Put a value into the specified field.
xbShort PutRawField (const char *Name, const char *buf)
 Put a raw value into the specified field.
xbShort ValidLogicalData (const char *)
 Determines if data is valid logical data.
xbShort ValidNumericData (const char *)
 Determines if data is valid numeric data.
xbLong GetLongField (const char *FieldName) const
 Get the long value of the specified field.
xbLong GetLongField (const xbShort FieldNo) const
 Get the long value of the specified field.
xbShort PutLongField (const xbShort, const xbLong)
 Put a long value into the specified field.
xbShort PutLongField (const char *, const xbLong)
 Put a long value into the specified field.
xbFloat GetFloatField (const char *FieldName)
 Get the float value of the specified field.
xbFloat GetFloatField (const xbShort FieldNo)
 Get the float value of the specified field.
xbShort PutFloatField (const char *, const xbFloat)
 Put a float value into the specified field.
xbShort PutFloatField (const xbShort, const xbFloat)
 Put a float value into the specified field.
xbDouble GetDoubleField (const char *)
 Get the double value of the specified field.
xbDouble GetDoubleField (const xbShort, xbShort RecBufSw=0)
 Get the double value of the specified field.
xbShort PutDoubleField (const char *, const xbDouble)
 Put a double value into the specified field.
xbShort PutDoubleField (const xbShort, const xbDouble)
 Put a double value into the specified field.
xbShort LockDatabase (const xbShort, const xbShort, const xbLong)
xbShort ExclusiveLock (const xbShort)
xbShort ExclusiveUnlock (void)
void AutoLockOn (void)
 Turn autolock on.
void AutoLockOff (void)
 Turn autolock off.
xbShort GetAutoLock (void)
 Return whether or not autolocking is on or off.
void RealDeleteOn (void)
 Turn on "real" deletes.
void RealDeleteOff (void)
xbShort GetRealDelete (void)
 Return whether "real" deletes are on or off.

Public Attributes

xbXBasexbase

Protected Member Functions

xbShort DeleteAll (xbShort)
 Delete all records.
void InitVars (void)
 Initialize private data members.
xbShort PackDatafiles (void(*statusFunc)(xbLong itemNum, xbLong numItems)=0)
 Pack data file.
xbShort ReadHeader (xbShort)
 Read the dbf header.
xbShort WriteHeader (const xbShort)
 Write the dbf header.

Protected Attributes

xbString DatabaseName
xbShort XFV
xbShort NoOfFields
char DbfStatus
FILE * fp
xbSchemaRecSchemaPtr
char * RecBuf
char * RecBuf2
char Version
char UpdateYY
char UpdateMM
char UpdateDD
xbULong NoOfRecs
xbUShort HeaderLen
xbUShort RecordLen
xbULong FirstFreeRec
xbULong RealNumRecs
xbIxListMdxList
xbIxListNdxList
xbIxListFreeIxList
xbULong CurRec
xbShort AutoLock
xbShort RealDelete


Detailed Description

xbDbf class

The xbDbf class encapsulates an xbase DBF database file. It includes all dbf access, field access, and locking methods.


Constructor & Destructor Documentation

xbDbf::xbDbf xbXBase x  ) 
 

Constructor.

Parameters:
x pointer to the global xbXbase class


Member Function Documentation

xbShort xbDbf::AppendRecord void   ) 
 

Append the current record to the data file.

This method attempts to append the contents of the current record buffer to the end of the XDB DBF file and updates the file date and number of records in the file. Also updates any open indexes associated with this data file.

Returns:
One of the following:

Return CodeDescription
XB_NO_ERRORNo error
XB_LOCK_FAILEDCouldn't lock file
XB_WRITE_ERRORError writing to file

void xbDbf::AutoLockOff void   )  [inline]
 

Turn autolock off.

void xbDbf::AutoLockOn void   )  [inline]
 

Turn autolock on.

xbShort xbDbf::BlankRecord void   ) 
 

Blank the record buffer.

Sets the record to spaces.

xbLong xbDbf::CalcCheckSum void   ) 
 

Calculate checksum for the current record.

Internal use only.

xbShort xbDbf::CloseDatabase bool  deleteIndexes = 0  ) 
 

Close the dbf file.

This method attempts to close the XDB DBF file which was previously opened with either CreateDatabase() or OpenDatabase(). Deletes any memory allocated. Automatically closes any open indexes associated with this data file.

Parameters:
deleteIndexes if TRUE, the indexes (xbIndex instances) will also be deleted (index files will not be deleted)
Returns:
One of the following:

Return CodeDescription
XB_NO_ERRORNo error
XB_NOT_OPENFile was not open

xbShort xbDbf::CopyDbfStructure const char *  ,
xbShort 
 

Copy DBF structure.

xbShort xbDbf::CreateDatabase const char *  TableName,
xbSchema s,
const xbShort  Overlay
 

Create the dbf file.

This method attempts to create the XDB DBF file with the specified name (TableName) and schema (xbSchema s). The OverLay switch is used to determine if an existing file should be overwritten or an error flagged if the file already exists. The record buffer is blanked (set to spaces).

Parameters:
TableName name of the table
s xbSchema
Overlay One of the following:

OverLayDescription
XB_OVERLAYOverwrite existing file if it exists
XB_DONTOVERLAYReport an error if file exists

Returns:
One of the following return codes:

Return CodeDescription
XB_NO_ERRORNo error
XB_FILE_EXISTSIf the file exists and OverLay is XB_DONTOVERLAY
XB_OPEN_ERRORCouldn't open the file
XB_NO_MEMORYMemory allocation error
XB_WRITE_ERRORCouldn't write to disk

xbLong xbDbf::DbfTell void   )  [inline]
 

Return the current position in the dbf file.

xbShort xbDbf::DeleteAll xbShort   )  [protected]
 

Delete all records.

xbShort xbDbf::DeleteAllRecords void   )  [inline]
 

Delete all records.

xbShort xbDbf::DeleteRecord void   ) 
 

Delete the current record.

Marks the current record as deleted or if "real" deletes are turned on (xbDbf::RealDeleteOn()) will delete the record and add it to the free record list. Normal dBase behavior is to simply mark the record as deleted; the record will actually be deleted when the the DBF file "packed" (xbDbf::PackDatabase()). If "real" deletes are not on, a record may be undeleted using xbDbf::UndeleteRecord().

Returns:
One of the following:

Return CodeDescription
XB_NO_ERRORNo error
XB_INVALID_RECORDInvalid record number

xbShort xbDbf::DumpRecord xbULong  RecNo  ) 
 

Dump record.

Dump the contents of the specified record to stdout.

Parameters:
RecNo Record number of record to be dumped.
Returns:
An error code (same as GetRecord()).

xbShort xbDbf::ExclusiveLock const   xbShort  )  [inline]
 

xbShort xbDbf::ExclusiveUnlock void   )  [inline]
 

xbLong xbDbf::FieldCount void   )  [inline]
 

Return number of fields.

xbShort xbDbf::GetAutoLock void   )  [inline]
 

Return whether or not autolocking is on or off.

xbLong xbDbf::GetCurRecNo void   )  [inline]
 

Return current record number.

xbString& xbDbf::GetDbfName void   )  [inline]
 

Return Dbf name.

xbShort xbDbf::GetDbfStatus void   )  [inline]
 

Return status.

xbDouble xbDbf::GetDoubleField const   xbShort,
xbShort  RecBufSw = 0
 

Get the double value of the specified field.

xbDouble xbDbf::GetDoubleField const char *   ) 
 

Get the double value of the specified field.

xbShort xbDbf::GetField xbShort  FieldNo,
xbString ,
xbShort  RecBufSw
const
 

xbShort xbDbf::GetField const char *  Name,
char *  buf,
xbShort  RecBufSw
const
 

Get the value of the specified field.

Get the value of the field referenced by Name and place its value in buf.

Parameters:
Name Name of field.
buf Buffer to hold field value. Must be large enough to hold the entire field value. Use GetFieldLen() to determine the length of the field, if necessary.
RecBufSw 
Returns:
One of the following:

xbShort xbDbf::GetField const char *  Name,
char *  buf
const
 

Get the value of the specified field.

Get the value of the field specified by Name and place its value in buf.

Parameters:
Name Name of field.
buf Buffer to hold field value. Must be large enough to hold the entire field value. Use GetFieldLen() to determine the length of the field, if necessary.
Returns:
One of the following:

xbShort xbDbf::GetField xbShort  FieldNo,
char *  buf,
xbShort  RecBufSw
const
 

Get the value of the specified field.

Get the value of the field specified by FieldNo and place its value in buf.

Parameters:
FieldNo Number of field.
buf Buffer to hold field value. Must be large enough to hold the entire field value. Use GetFieldLen() to determine the length of the field, if necessary.
RecBufSw 
Returns:
The length of the field.

xbShort xbDbf::GetField xbShort  FieldNo,
char *  Buf
const
 

Get the value of the specified field.

const char * xbDbf::GetField const char *  Name  )  const
 

Get the value of the specified field.

Returns the value of the field specified by Name.

Parameters:
Name Name of field.
Returns:
Value of the specified field.

const char * xbDbf::GetField xbShort  FieldNo  )  const
 

Get the value of the specified field.

Returns the value of the field specified by FieldNo.

Parameters:
FieldNo Number of field.
Returns:
Value of the specified field.

xbShort xbDbf::GetFieldDecimal const   xbShort  ) 
 

Returns the number of decimals in the specified field.

Returns the number decimals in the field specified by FieldNo.

Parameters:
FieldNo Number of field.
Returns:
Number of decimals in the specified field.

xbShort xbDbf::GetFieldLen const   xbShort  ) 
 

Returns the length of the specified field.

Returns the length of the field specified by FieldNo.

Parameters:
FieldNo Number of field.
Returns:
Length of the specified field in bytes.

char * xbDbf::GetFieldName const   xbShort  ) 
 

Returns the name of the specified field.

Returns a pointer to the name for the field specified by FieldNo.

Parameters:
FieldNo Number of field.
Returns:
A pointer to the name of the field.

xbShort xbDbf::GetFieldNo const char *  name  )  const
 

Returns the field number of the specified field.

Returns the field number for the named field.

Parameters:
name Name of field.
Returns:
Number of field named name.

char xbDbf::GetFieldType const xbShort  FieldNo  )  const
 

Returns the type of the specified field.

Returns the type of the field specified by FieldNo.

Parameters:
FieldNo Number of field.
Returns:
Type of specified field.

xbShort xbDbf::GetFirstRecord void   ) 
 

Get the first physical record in the data file.

Attempts to retrieve the first physical record from the data file into the record buffer.

Returns:
One of the following:

Return CodeDescription
XB_NO_ERRORNo error
XB_LOCK_FAILEDCouldn't lock file
XB_NOT_OPENFile is not open
XB_INVALID_RECORDInvalid record number
XB_SEEK_ERRORError seeking file
XB_WRITE_ERRORError writing to file

xbFloat xbDbf::GetFloatField const xbShort  FieldNo  ) 
 

Get the float value of the specified field.

xbFloat xbDbf::GetFloatField const char *  FieldName  ) 
 

Get the float value of the specified field.

xbShort xbDbf::GetLastRecord void   ) 
 

Get the last phyiscal record in the data file.

Attempts to retrieve the last physical record from the data file into the record buffer.

Returns:
One of the following:

Return CodeDescription
XB_NO_ERRORNo error
XB_LOCK_FAILEDCouldn't lock file
XB_EOFAt end of file
XB_NOT_OPENFile is not open
XB_INVALID_RECORDInvalid record number
XB_SEEK_ERRORError seeking file
XB_WRITE_ERRORError writing to file

xbShort xbDbf::GetLogicalField const char *  FieldName  ) 
 

Get the logical value of the specified field.

xbShort xbDbf::GetLogicalField const xbShort  FieldNo  ) 
 

Get the logical value of the specified field.

xbLong xbDbf::GetLongField const xbShort  FieldNo  )  const
 

Get the long value of the specified field.

xbLong xbDbf::GetLongField const char *  FieldName  )  const
 

Get the long value of the specified field.

xbShort xbDbf::GetNextRecord void   ) 
 

Get the next physical record in the data file.

Attempts to retrieve the next physical record from the data file into the record buffer.

Returns:
One of the following:

Return CodeDescription
XB_NO_ERRORNo error
XB_LOCK_FAILEDCouldn't lock file
XB_EOFAt end of file
XB_NOT_OPENFile is not open
XB_INVALID_RECORDInvalid record number
XB_SEEK_ERRORError seeking file
XB_WRITE_ERRORError writing to file

xbShort xbDbf::GetPrevRecord void   ) 
 

Get the previous physical record in the data file.

Attempts to retrieve the previous physical record from the data file into the record buffer.

Returns:
One of the following:

Return CodeDescription
XB_NO_ERRORNo error
XB_LOCK_FAILEDCouldn't lock file
XB_BOFAt beginning of file
XB_NOT_OPENFile is not open
XB_INVALID_RECORDInvalid record number
XB_SEEK_ERRORError seeking file
XB_WRITE_ERRORError writing to file

xbShort xbDbf::GetRawField const char *  Name,
char *  buf
const
 

Get the raw value of the specified field.

Get the value of the field specified by Name and place its value in buf.

Parameters:
Name Name of field.
buf Buffer to hold field value. Must be large enough to hold the entire field value. Use GetFieldLen() to determine the length of the field, if necessary.
Returns:
One of the following:

xbShort xbDbf::GetRawField const xbShort  FieldNo,
char *  Buf
const
 

Get the raw value of the specified field.

xbShort xbDbf::GetRealDelete void   )  [inline]
 

Return whether "real" deletes are on or off.

Use this to determine if "real deletes" are being used with the database.

xbShort xbDbf::GetRecord xbULong  RecNo  ) 
 

Get a record from the data file.

This method attempts to retrieve the record specified by RecNo from the data file into the record buffer.

Parameters:
RecNo Record number to retrieve
Returns:
One of the following:

Return CodeDescription
XB_NO_ERRORNo error
XB_LOCK_FAILEDCouldn't lock file
XB_NOT_OPENFile is not open
XB_INVALID_RECORDInvalid record number
XB_WRITE_ERRORError writing to file

char* xbDbf::GetRecordBuf void   )  [inline]
 

Return a pointer to the record buffer.

xbShort xbDbf::GetRecordLen void   )  [inline]
 

Return record length.

char * xbDbf::GetStringField const char *  FieldName  ) 
 

Get the string value of the specified field.

char * xbDbf::GetStringField const xbShort  FieldNo  ) 
 

Get the string value of the specified field.

void xbDbf::InitVars void   )  [protected]
 

Initialize private data members.

Internal use only.

xbShort xbDbf::LockDatabase const   xbShort,
const   xbShort,
const   xbLong
[inline]
 

xbShort xbDbf::NameSuffixMissing xbShort  type,
const char *  name
 

Determine if file name suffix is missing.

Internal use only.

xbLong xbDbf::NoOfRecords void   ) 
 

Gets the number of records in the data file.

xbShort xbDbf::OpenDatabase const char *  TableName  ) 
 

Open the DBF file.

This method attempts to open the XDB DBF file with the specified name (TableName). This method does not position to any particular record in the file. The record buffer is blanked (set to spaces).

Parameters:
TableName Name of table to open
Returns:
One of the following:

Return CodeDescription
XB_NO_ERRORNo error
XB_OPEN_ERRORCouldn't open file
XB_NO_MEMORYMemory allocation error
XB_NOT_XBASENot an XDB DBF file

xbShort xbDbf::PackDatabase xbShort  LockWaitOption,
void(*)(xbLong itemNum, xbLong numItems)  packStatusFunc = 0,
void(*)(xbLong itemNum, xbLong numItems)  indexStatusFunc = 0
 

Pack the database.

This method removes all records marked for deletion from an Xbase (.DBF) file, reindexes any open index files, and also reorganizes any memo fields stored in a .DBT memo file.

Parameters:
LockWaitOption One of the following:

LockWaitOptionDescription
F_SETLKReturn immediately if the DBF file cannot be locked
F_SETLKWWait for lock on DBF file to succeed

Returns:
One of the following return codes:

Return CodeDescription
XB_NO_ERRORNo error
XB_CLOSE_ERRORUnable to close intermediate work file
XB_OPEN_ERRORCould not open file
XB_NO_MEMORYMemory allocation error
XB_WRITE_ERRORCouldn't write to disk
XB_SEEK_ERRORError seeking file
XB_LOCK_FAILEDUnable to lock file or index

xbShort xbDbf::PackDatafiles void(*)(xbLong itemNum, xbLong numItems)  statusFunc = 0  )  [protected]
 

Pack data file.

xbLong xbDbf::PhysicalNoOfRecords void   ) 
 

Get the physical number of records in the data file.

xbShort xbDbf::PutDoubleField const   xbShort,
const   xbDouble
 

Put a double value into the specified field.

xbShort xbDbf::PutDoubleField const char *  ,
const   xbDouble
 

Put a double value into the specified field.

xbShort xbDbf::PutField const char *  Name,
const char *  buf
 

Put a value into the specified field.

xbShort xbDbf::PutField const   xbShort,
const char * 
 

Put a value into the specified field.

xbShort xbDbf::PutFloatField const   xbShort,
const   xbFloat
 

Put a float value into the specified field.

xbShort xbDbf::PutFloatField const char *  ,
const   xbFloat
 

Put a float value into the specified field.

xbShort xbDbf::PutLongField const char *  ,
const   xbLong
 

Put a long value into the specified field.

xbShort xbDbf::PutLongField const   xbShort,
const   xbLong
 

Put a long value into the specified field.

xbShort xbDbf::PutRawField const char *  Name,
const char *  buf
 

Put a raw value into the specified field.

xbShort xbDbf::PutRawField const xbShort  FieldNo,
const char *  buf
 

Put a raw value into the specified field.

xbShort xbDbf::PutRecord xbULong  RecNo  ) 
 

Write the current record buffer to the specified record in the data file.

Attempts to write the contents of the record buffer to the record specified by RecNo. Updates any open indexes.

Parameters:
RecNo Record number to which data should be written
Returns:
One of the following:

Return CodeDescription
XB_NO_ERRORNo error
XB_LOCK_FAILEDCouldn't lock file
XB_NOT_OPENFile is not open
XB_INVALID_RECORDInvalid record number
XB_SEEK_ERRORError seeking file
XB_WRITE_ERRORError writing to file

xbShort xbDbf::PutRecord void   ) 
 

Write the current record buffer to the current record in the data file.

Attempts to write the contents of the record buffer to the current record in the data file. Updates any open indexes.

See also:
PutRecord(xbULong RecNo)
Returns:
One of the following:

Return CodeDescription
XB_NO_ERRORNo error
XB_LOCK_FAILEDCouldn't lock file
XB_NOT_OPENFile is not open
XB_INVALID_RECORDInvalid record number
XB_SEEK_ERRORError seeking file
XB_WRITE_ERRORError writing to file

xbShort xbDbf::ReadHeader xbShort  PositionOption  )  [protected]
 

Read the dbf header.

Internal use only.

Parameters:
PositionOption 

void xbDbf::RealDeleteOff void   )  [inline]
 

Turn off "real" deletes

void xbDbf::RealDeleteOn void   )  [inline]
 

Turn on "real" deletes.

This should be done before creating a database (with xbDbf::CreateDatatabase()) and thereafter before opening a database with xbDbfCreateDatabase().

You cannot "turn on" real deletes once a database has been created and records added.

xbShort xbDbf::RebuildAllIndices void(*)(xbLong itemNum, xbLong numItems)  statusFunc = 0  ) 
 

Rebuild all index files.

xbShort xbDbf::RecordDeleted void   ) 
 

Determine if current record is deleted.

Returns:
TRUE (1) if the current record is marked as deleted or FALSE (0) if not.

void xbDbf::ResetNoOfRecs void   )  [inline]
 

Set number of records to zero????

xbShort xbDbf::SetVersion xbShort  v  ) 
 

Set dbase version for the dbf file.

Set dbase version. Should only be used before creating a database with xbDbf::CreateDatabase().

Parameters:
v version, either 3 or 4.

xbShort xbDbf::UndeleteAllRecords void   )  [inline]
 

Undelete all records.

xbShort xbDbf::UndeleteRecord void   ) 
 

Undelete the current record.

Marks the currect record as not deleted (i.e. removes the flag indicating the record is deleted). This method may not be used (and will return an error code) if "real" deletes are on.

Returns:
One of the following:

Return CodeDescription
XB_NO_ERRORNo error
XB_INVALID_RECORDInvalid record number

xbShort xbDbf::ValidLogicalData const char *  buf  ) 
 

Determines if data is valid logical data.

Determines if the data in buf is valid for a logical field value.

Parameters:
buf data to be tested
Returns:
TRUE (non-zero) if valid, FALSE (zero) if not.

xbShort xbDbf::ValidNumericData const char *  buf  ) 
 

Determines if data is valid numeric data.

Determines if the data in buf is valid for a numeric field value.

Parameters:
buf 
Returns:
TRUE (non-zero) if valid, FALSE (zero) if not.

xbShort xbDbf::WriteHeader const   xbShort  )  [protected]
 

Write the dbf header.

Internal use only.

Parameters:
PositionOption flag that indicates whether file postition should be moved. non-zero if so, zero if not.

xbShort xbDbf::Zap xbShort   ) 
 

Delete all records and pack data file.


Member Data Documentation

xbShort xbDbf::AutoLock [protected]
 

xbULong xbDbf::CurRec [protected]
 

xbString xbDbf::DatabaseName [protected]
 

char xbDbf::DbfStatus [protected]
 

xbULong xbDbf::FirstFreeRec [protected]
 

FILE* xbDbf::fp [protected]
 

xbIxList* xbDbf::FreeIxList [protected]
 

xbUShort xbDbf::HeaderLen [protected]
 

xbIxList* xbDbf::MdxList [protected]
 

xbIxList* xbDbf::NdxList [protected]
 

xbShort xbDbf::NoOfFields [protected]
 

xbULong xbDbf::NoOfRecs [protected]
 

xbShort xbDbf::RealDelete [protected]
 

xbULong xbDbf::RealNumRecs [protected]
 

char* xbDbf::RecBuf [protected]
 

char* xbDbf::RecBuf2 [protected]
 

xbUShort xbDbf::RecordLen [protected]
 

xbSchemaRec* xbDbf::SchemaPtr [protected]
 

char xbDbf::UpdateDD [protected]
 

char xbDbf::UpdateMM [protected]
 

char xbDbf::UpdateYY [protected]
 

char xbDbf::Version [protected]
 

xbXBase* xbDbf::xbase
 

xbShort xbDbf::XFV [protected]
 


The documentation for this class was generated from the following files:
Generated on Mon Sep 11 18:30:06 2006 for Xbase Class Library by  doxygen 1.4.6