SPECIAL OFFER        Order and save right now!
20% off with the 729824315 dicscount code for Ultimate Pack and any another product for Delphi from Greatis Programming!

⤷ Ins records of different length

If you want to use one function to insert records into different tables, then you may use open-array parameters.

procedure InsertRec(const S: array of const);
begin
  Form1.Table1.AppendRecord(S);
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  Table1.Active:=False;
  Table1.Tablename:='Animals.dbf';
  Table1.Active:=True;
  InsertRec(['MyFish', 3, 5, 'MyAquarium']);
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  Table1.Active:=False;
  Table1.Tablename:='Clients.dbf';
  Table1.Active:=True;
  InsertRec(
    ['MyLastName', 'MyFirstName', 100, 'MyAddress', 'MyTown']);
end;
More for developers
Databases for Amazon Associates
Amazon Categories
Amazon Nodes