<< Click to Display Table of Contents >> Navigation: Apollo VCL Components > Apollo VCL Component Reference > TApolloTable > TApolloTable Methods > ApolloFieldCount |
Declaration
function ApolloFieldCount: Word;
Description
Extracts the number of fields in the current table. This number does not include the hidden delete flag field.
To avoid a naming conflict with TDataSet.FieldCount, the old TApollo.FieldCount method has been renamed to ApolloFieldCount in this release. Unlike TDataSet.FieldCount, this method does NOT recognize calculated fields, and strictly returns the number of physical fields within the table.
Return Value
An integer containing the number of fields in each record.
Delphi Example
// Fills a list box with field names
procedure Form1.Button1Click(Sender: TObject);
var
iFldCount, i: Integer;
begin
ApTbl.Open;
iFldCount := ApTbl.ApolloFieldCount;
for i := 1 to iFldCount do
ListBox1.Items.Add( ApTbl.FieldName( i ));
end;
See Also
FieldDecimals, FieldName, FieldNum, FieldOffset, FieldType, FieldWidth