function indexOfField(fieldname : String): Integer;

The function indexOfField() returns a number of field with a particular name.
If there is no field with such name, it returns -1.


begin
    // your code
    field := dbf.indexOfField( 'FIRSTNAME' );
    if field >= 0 then
    begin
        // your code
    end;
end;