I create a ADOTable which may be from 1 to over 25 records. I After use I need to delete all records. I have the following procedure:
procedure TForm_Main.Button_CleanClick(Sender: TObject);
begin
ADOTable1.First;
With ADOTable1 do
begin
while NOT EOF do
begin
Delete;
next;
end;
end;
end;
Only a few records are deleted and I get the following error message:
Key column information is insufficient. Too many rows are affected by update.
What is my problem and how can I delete all records?
procedure TForm_Main.Button_CleanClick(Sender: TObject);
begin
ADOTable1.First;
With ADOTable1 do
begin
while NOT EOF do
begin
Delete;
next;
end;
end;
end;
Only a few records are deleted and I get the following error message:
Key column information is insufficient. Too many rows are affected by update.
What is my problem and how can I delete all records?