Master/Detail Deletions



Delphi 7 + ADO + MS ACESS

I am trying to accomplish to delete all records from my tables utilizing
this method below - It deletes 3/4 of all the records, but not all - what am
i doing wrong?

If you know a better way to delete all records from tables during runtime
(and resetting the autoInc indexes AND/Or compacting & repairing etc) I
would appreciate any suggestions

Thanks

IElite

procedure TfrmMain.btnEmptyClick(Sender: TObject);
begin
with frmData do
begin
tblParents.last;
while not tblParents.bof do
begin
tblChildren.last;
while not tblChildren.bof do
begin
tblChildren.delete;
tblChildren.prior;
end;
tblParents.delete;
tblParents.prior;
end;
end;
end;


.



Relevant Pages

  • Re: a97 to a03 and DAO to ADO
    ... I know the performance benefits of utilizing ADO over DAO. ... The Access DB I am asked to upgrade utilizes a combination of Access tables ...
    (microsoft.public.access.conversion)
  • Re: SQL string error
    ... Any roundabout way to accomplish this? ... From Googling, it looks like Jet SQL does not support the DECIMAL ... Yes Norm I am using ADO. ...
    (microsoft.public.vb.general.discussion)
  • Re: a97 to a03 and DAO to ADO
    ... You can use both ADO and DAO in the same MDB, Mario, as long as you're ... > The Access DB I am asked to upgrade utilizes a combination of Access ... >>> upgrade the code from utilizing DAO 3.6 to ADO. ...
    (microsoft.public.access.conversion)
  • Re: ADOdataset loses two rows if processor is two busy (asynchronous)
    ... I'm not sure what your trying to accomplish but using ado table makes the ... program read all 800000 rows everytime you open and close the table object. ... you could fix it all by using adodataset to do the sql command you indicated ...
    (borland.public.delphi.database.ado)
  • Re: SQL string error
    ... This is odd. ... Any roundabout way to accomplish this? ... But I assumed you were using ADO, ...
    (microsoft.public.vb.general.discussion)