Well this is concept code but it should do the trick...but how should it look for
SQL?
Delphi-Quellcode:
if item then begin
for i:=0 to 9 do begin
ABSTable1.Open;
ABSTable1.Insert; // adds new record into table
ABSTable1.Fields.FieldByName('FirstName').AsString:='John';
ABSTable1.Fields.FieldByName('LastName').AsString:='Heyho';
ABSTable1.Fields.FieldByName('Sallary').AsString:='20.200';
ABSTable1.Post; // saves newly created record to the table
ABSTable1.Next;
end;
Item:=false;
end;
end
else begin
for i:=0 to 9 do begin
ABSTable1.Locate('ID',i,[]);
ABSTable1.Edit; // starts updating of current record
ABSTable1.Fields.FieldByName('FirstName').AsString:='John';
ABSTable1.Fields.FieldByName('LastName').AsString:='Heyho';
ABSTable1.Fields.FieldByName('Sallary').AsString:='20.200';
ABSTable1.Post; // saves newly created record to the table
end;