DF_FILE_NUMBER_FIELDS
See Also
Description
The number of columns in the table.
Level
Table
Supported by
All Drivers
Type
Numeric, permanent
Access
Read Only
Values
1 ~ maximum number of columns allowed in the database
Remarks
This attribute returns the number of columns in the table. The attribute cannot be directly set. It is indirectly manipulated by using the Create_Field and Delete_Field commands.
Example
Procedure ShowNames Handle hTable
String sTable
String sColumn
Integer iNumColumns
Integer iColumn
Get_Attribute DF_FILE_ROOT_NAME Of hTable To sTable
Showln "The columns in table " sTable " have the following names:"
Get_Attribute DF_FILE_NUMBER_FIELDS Of hTable To iNumColumns
For iColumn From 1 To iNumColumns
Get_Attribute DF_FIELD_NAME Of hTable iColumn To sColumn
Showln (Right(" " + String(iColumn), 5)) ": " sColumn
Loop
End_Procedure // ShowNames
This example retrieves and displays the names of all columns in the table.