Board index » delphi » Help with Paradox 5 table - Cascade Deletes don't seem to work
Serge Beaulieu
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
|
Serge Beaulieu
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Help with Paradox 5 table - Cascade Deletes don't seem to work
Hi there,
I have written a delphi 3 App that works with a master-detail paradox 5 I have a master table, with 3 detail tables (all paradox5 tables). I have Yet when I try to delete a record in the master table, I get an error, and Any help would be appreciated here. I am no wiz at either Delphi or -- |
Steve Koters
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:Help with Paradox 5 table - Cascade Deletes don't seem to workOn 29 Jul 1999 14:26:08 GMT, "Serge Beaulieu" <sergeb_nospam...@fundy.net> wrote: Quote>I have written a delphi 3 App that works with a master-detail paradox 5 adding records to a child table for which there is no matching record in the parent table. It will also cause the key field(s) in the child table to be changed when the corresponding key field(s) in the parent are changed (commonly referred to as a cascading update). These events occur automatically, requiring no intervention by a Delphi application using these tables. However, the Paradox Referential Integrity feature will not accommodate cascading deletes. That is, Delphi will not allow you to delete a record in the parent table while matching records exist in the child table. This would make "orphans" of the child records, losing referential integrity. Delphi raises an exception when an attempt is made to delete such a parent record. To effect a cascading delete requires that the deletion of the matching A record in a table is deleted by a call to the Delete method of the TTable To handle the deletion of one or more child records, in a BeforeDelete procedure TForm1.Table1BeforeDelete(DataSet: TDataset); In the above example, the parent table is represented by the TTable This example presumes that the parent and child tables are linked with a procedure TForm1.Table1BeforeDelete(DataSet: TDataset); In the above, it is the first field in the parent table (Table1) upon which _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ |
Ralf Mimou
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:Help with Paradox 5 table - Cascade Deletes don't seem to workH, Serge Beaulieu <sergeb_nospam...@fundy.net> schrieb in im Newsbeitrag: Quote> Yet when I try to delete a record in the master table, I get an error, and information :) Borland's Paradox engine does not support cascaded delete. It don't work. No way. Basta. Bye, Ralf |
1. Records don't seem to be updated with SQL-Inserts/Deletes
2. Cached Updates don′t seem to work rigth with Paradox Driver in Multi-user environment
3. Cascaded deletes doesn't work
4. ON DELETE CASCADE doesn't work on Interbase 5
5. How can I Cascade Delete a Paradox Table in Delphi 2
6. Clientdatasets don't seem to help (speed) when updating MS SQL
7. Clientdatasets don't seem to help (speed) when updating MS SQL
8. Problem: Procedure that deletes table only if table exists doesn't work