<< Click to Display Table of Contents >> Navigation: Apollo VCL Components > Apollo VCL Component Reference > TApolloTable > TApolloTable Methods > GetTableType |
New TableType added: ttSXNSX_DBT to support (DBF/DBT/NSX) file combinations. This is a primarily a legacy type table from the Clipper/SIx RDD days when you could mix DBF/DBT and use NSX indexes.
Declaration
function GetTableType: TApolloTableType;
Description
Returns the table type value based on the DBF header information. This function is useful when the table type is unknown. The caveat is a memo field must exist in the DBF file because the memo definition is how the table signatures change.
Parameters
None.
Return Value
TApolloTableType: ttSXNONE, ttSXCDX, ttSXNTX, ttSXNSX
TApolloTable.TableType must be explicitly set before opening a table. The auto-detection routine (CheckTableType) in previous versions of Apollo VCL, was unable to detect ttSXNSX_DBT-type tables. The header for DBF/DBT/NTX and DBF/DBT/NSX is identical, so there is no way to know which to use.
Delphi Example
// Read long NOTES field into PChar cpNotes
cpType := ApTbl.GetTableType;
C++Builder Example
// Read long NOTES field into PChar cpNotes
cpNotes = ApTbl->GetTableType;
GetTrimString