FieldByName is fine, but if your accessing the field a lot try and keep a pointer to the returned field, this saves a little bit of time.
eg. Instead of the this->

procedure TForm1.Test;
var
  tot:integer;
begin
  tot:=0;
  table1.first;
  while not table1.eof do begin
    tot:=tot+table1.fieldbyname('Value').AsInteger;
    table1.next;
  end;
end;

Do this instead->

procedure TForm1.Test;
var
  tot:integer;
  ValueField:TField;
begin
  tot:=0;
  ValueField:=table1.fieldbyname('Value');
  table1.first;
  while not table1.eof do begin
    tot:=tot+ValueField.AsInteger;
    table1.next;
  end;
end;

As you can see from above the FieldByName is only called once and will save Delphi from having to find the field each time.
Another option is to create pesistent fields in Delphi by double clicking on the Table and adding them.  This then allows you to access
the fields like

Table1SomeField.Value:=SomeValue;

What should one use instead?

Persistent fields should be faster than FieldByName. one can also assign the result of FieldByName to a local variable.

If one uses FieldByName a lot since that's how he knows his fields?

Nothing wrong with using FieldByName unless one need to squeeze the last ounce of speed out.

Home | Site Contents | Documentation | FAQ, Tips & Tricks | NexusDB FAQ | Table based access