record/key deleted error: help

record/key deleted error: help

Post by EMBX » Tue, 21 Mar 2000 04:00:00


I have a question, I have a master/detail paradox table, when I delete the
master record it also deletes the detail records in the before delete event.
So far so good, but
If the master record was active then it gives me the error
master/key deleted.
I try to trap this error but it won't work..
Any suggestions?
Thanks in advange

Here is my code to trap the error while I have the constant eKeyOrrecDeleted
= 8708 just above the implementation section

procedure TDataMod.TblStaffDeleteError(DataSet: TDataSet;
  E: EDatabaseError; var Action: TDataAction);
  if (E is EDBEngineError) then
    if (E as EDBEngineError).Errors[0].Errorcode = eKeyOrrecDeleted then
      MessageDlg('The records are deleted succesfully.',
                 mtInformation, [mbOK], 0);


1. Help:Record/Key Deleted message and Error message Numbers

I am rather new to programming and  have a Delphi 3 application with a
Master/Detail Table relationship. In the Master only one field is keyed and
in the Detail two fields are keyed. No Autoincrement fields are used. When I
try to edit one of the Keyed fields I keep getting (oh Boy am I tired of it)
the Record/Key Deleted message. Have been trying to trap the error but am
not succeding (maybe I should look for another occupation instead?).  The
same application written in Delphi 1 runs just fine (urrgh).
Would be very thankful if somebody out there has any ideas on how to solve
this problem.
Also does anybody know if there is a list of all DatabaseEngine errors
containing their appropriate numbers - can't make head or tail of
DBIErrs.Int and IDAPI.h......... how do I know the constant for the base

Please forgive my questions if they are silly - but answer them anyway if
you can.


2. Connection is busy problem

3. Help please with error: Record/Key deleted

4. Snapshot replication and order of application.

5. delete primary key records together with the foreign keys records

6. ULH errors

7. Error 3167 Record Deleted when there is no deleted record

8. Printer Commands

9. error in deleting a record which is foreign key

10. Record/Key deleted error message

11. BDE Error Record Key Deleted

12. "Record/Key Deleted" BDE Error

13. Record/Key deleted Error Message