Cascade Delete in PDox7, doesn't

Cascade Delete in PDox7, doesn't

Post by Andrew J. Coo » Wed, 20 Nov 1996 04:00:00



I have a pair of tables that are linked with referential integrity.  I set
the relationship type to "Cascade" rather than "Restrict".

According to the on-line help screens, this is supposed to cause child rows
in the dependent table to be deleted when the parent row in the parent
table is deleted.

In my real daytime job I'm a IBM DB2 mainframe programmer, and I kind of
know what to expect based on the on-line help.

However, I've found that in my Delphi application (Delphi 2.0, Desktop
edition), running against these Paradox 7.0 tables, I get an exception when
I try to delete the parent row--the exception says it can't be deleted
because of the existing child rows.

To work around this, I've coded my own delete of any applicable child rows
before deleting the parent row.

But it doesn't seem like I should have to do that.

Am I misunderstanding the documentation, or have I set up the tables and/or
the referential integrity wrong?

Any help?

Thanks,
Andy
--
Omaha, NE, USA

 
 
 

1. Cascaded deletes doesn't work

I don't get it.
I set up two tables with ref. integrity using the Database Desktop.  I set
them for cascaded deletes, but when I try to delete the master record, the
BDE complains that there are detail records.  I thought that it was
supposed to delete the detail records as well?

Oh yeah, I am using Paradox tables

--
----
Joseph I. Ceasar (Yossi)
CLS Computer Solutions

2. solaris2

3. Can't enforce FK contrain on Delete Cascade and Update Cascade

4. a simple sql update-statement??

5. delete offline DB doesn't delete files?

6. How to pivot a table

7. Deleting device doesn't delete DAT file

8. Summer _BlowOut: Electric Scooters HOT this Summer ni

9. 'on delete cascade' equivalent

10. Q: CRecordSet::Delete() doesn't really delete??

11. Syntaks in 'cascade delete'

12. 'on delete cascade' confusion