Hi:
I'm using Access Database and I'm trying to delete a record from a table using the following code:
MyDataModule.tblPerson.Active := True;
MyDataModule.tblPerson.First;
while not MyDataModule.tblPerson.Eof do
begin
MyDataModule.tblPerson.Edit;
MyDataModule.tblPerson.Delete;
end;
MyDataModule.tblPerson.Active := False;
When the program tries to execute the Delete line, the following error message is displayed: Key violation [ODBC Microsoft Access Driver] Query is too complex.
I'm using Access Database and I'm trying to delete a record from a table using the following code:
MyDataModule.tblPerson.Active := True;
MyDataModule.tblPerson.First;
while not MyDataModule.tblPerson.Eof do
begin
MyDataModule.tblPerson.Edit;
MyDataModule.tblPerson.Delete;
end;
MyDataModule.tblPerson.Active := False;
When the program tries to execute the Delete line, the following error message is displayed: Key violation [ODBC Microsoft Access Driver] Query is too complex.