find last customer no-lock.
delete customer.
disp custnum.
which error do you expect
Answer A :
** No Customer record is available. (91)
Answer B :
** The Customer record has NO-LOCK status. DELETE not allowed. (335)
Answer C :
It depends
See attachment for clue
[View:/cfs-file/__key/communityserver-discussions-components-files/26/delcust.p:32:32]
Haha, I assume you have run into this and pulled your hair out, wondering what was going on?
Answer A if you use the attached delete trigger.
The delete trigger fires , causes a lock on the record and the delete goes ahead.
Answer D:
Open orders exist for Customer 8580 . Cannot delete.
Answer E (in a two second attempt to subvert the sports database):
Attempt to OVERRIDE a schema delete trigger for Customer. (3224)
The code as you have written above will result in Answer B, assuming at least one customer exists. If no customer exists, then Answer A.
Answer A if you use the attached delete trigger.
The delete trigger fires , causes a lock on the record and the delete goes ahead.
Haha, I assume you have run into this and pulled your hair out, wondering what was going on?