function FieldCount(dbf :integer): integer;
FieldCount returns a number of fields in a dbf file.
Be careful. The first field has a number 0 and the last field has a number FieldCount-1.
var
dbf :integer;
begin
dbf := OpenBase( 'filename.dbf' );
if dbf <> 0 then
begin
showmessage( FieldCount(dbf) );
CloseBase(dbf);
end;
end.
|