Help:Record/Key Deleted message and Error message Numbers

Help:Record/Key Deleted message and Error message Numbers

Post by Lucien Lun » Sun, 31 Dec 1899 09:00:00



Hello
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
category???

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

Lucien

 
 
 

Help:Record/Key Deleted message and Error message Numbers

Post by Lucien Lun » Sun, 31 Dec 1899 09:00:00


When I try to edit one of the Keyed fields in the Detail Table that is.

Lucien

 
 
 

Help:Record/Key Deleted message and Error message Numbers

Post by Oliver Townshen » Sun, 31 Dec 1899 09:00:00


Quote:> 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.

The fields you are changing which are causing the problem are causing
you records to pass out of view of the BDE.  Normally this is because
(as you have pointed out) of autoincrement fields.  Is there something
special about the fields (eg are you using a filter, are they not all of
the keys in the relationship?)

How does delphi know about your relationship?  Are we talking about two
ttables with a MasterSource style relationship?  I find it hard to
believe that something this simple is causing the BDE problems.

The simple solution would be to not show the keyed field that is common
to both.  If the user is too change this field, then you will need to do
a DisableControls, allow them to change the field, do a Refresh, and
then do an EnableControls.  This sort of operation might be described as
a 'move'.

Oliver

Sashalom Pty Ltd
Ph: +61-2-9283-1377 (w) 9675-1769 (h) 0411 754 414 (mob)

 
 
 

Help:Record/Key Deleted message and Error message Numbers

Post by Lucien Lun » Sun, 31 Dec 1899 09:00:00


Thanks Oliver

Have done a disable/refresh/enable and it works fine now.

Will certainly post more questions, knowing me:-)

Actually - assume we have a MasterTable and a DetailTable. In the
MasterTable are say Customers, in the DetailTable Orders. The MasterTable
has only one Keyed Field, say Customer Number, and the DetailTable has two
CustomerNumber and InvoiceNumber or DateOfPurchase. Assuming that there are
entries in the DetailTable, after a while the enduser discovers that the
wrong CustomerNumber
has been used for a while. If the CustomerNumber is edited in the
MasterTable the Details have nowhere to belong to. My question is how do I
Update all CustomerNumbers in the DetailTable as they are edited in the
MasterTable?

Well, that's all (I hope)

Thanks again
Lucien

 
 
 

1. Record/Key deleted Error Message

I'm getting the following error message "Record/Key Deleted" if two users
try to insert a record at exactly the same time.  Does anyone know what
causes this error message and maybe what I need to do to write an
Exception Handler to take care of this problem????  I haven't been using
Delphi for very long, so please keep that in mind when responding :)

Thanks in advance,
Leilani Boyles

2. Oracle Financials Developers needed in Philly, PA

3. Record/Key deleted error message

4. how to set constraints in MS Access

5. Error message while deleting records from Datagrid

6. RDBMSs that can handle binary data?

7. 2 tables

8. how to find the Error Message Text from Error Number

9. no error numbers - only error messages?

10. Paradox Engine 2.0 Internal Error Messages - Error Number 203

11. Help please with error: Record/Key deleted

12. record/key deleted error: help