|
Log in | ||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
First, I'm using Delphi 2007 with Nexus 3.05.01.
My app uses 36 different tables all with ref int. I was adding some new ref int rules to a detail table that I know will cause 2 of the records in the table to violate the target required constraint of the rule. The rule was added successfully but the records remained in the table. I can even edit the records without any ref int complaints. If I try to add a new record using the same values I do get a ref int error about a missing master record so I know the rule is active. Is a target required constraint only enforced on an insert or if the fields involved in the constraint are modified? I was expecting these two records to be deleted from the table once the ref int rule was created because they violated the target required constraint. Is this normal? Is there a way to force Nexus to reapply constraints to weed out invalid records that don't meet the new constraints? I tried Pack and that did not do anything. -- Scott Slater |
|
#2
|
|||
|
|||
|
Anyone with ideas?
-- Scott Slater "Scott Slater" <sslater at aegroup dot com> wrote in message news:4f35c6ca$1@DSVR011613.... > First, I'm using Delphi 2007 with Nexus 3.05.01. > > My app uses 36 different tables all with ref int. I was adding some new > ref int rules to a detail table that I know will cause 2 of the records in > the table to violate the target required constraint of the rule. The rule > was added successfully but the records remained in the table. I can even > edit the records without any ref int complaints. If I try to add a new > record using the same values I do get a ref int error about a missing > master record so I know the rule is active. > > Is a target required constraint only enforced on an insert or if the > fields involved in the constraint are modified? I was expecting these two > records to be deleted from the table once the ref int rule was created > because they violated the target required constraint. Is this normal? Is > there a way to force Nexus to reapply constraints to weed out invalid > records that don't meet the new constraints? I tried Pack and that did > not do anything. > > -- > Scott Slater > |
|
#3
|
|||
|
|||
|
> Is a target required constraint only enforced on an insert or if the
> fields involved in the constraint are modified? I was expecting Yes. > these two records to be deleted from the table once the ref int rule > was created because they violated the target required constraint. Is > this normal? Is there a way to force Nexus to reapply constraints to > weed out invalid records that don't meet the new constraints? I > tried Pack and that did not do anything. I suspect the majority of users would be appalled if the database engine deleted records without further ado. I'm afraid you'll need to check manually wether existing data fulfils the ref int constraints. The engine can't really know what you'd want do to with records that doesn't. -- Eivind Bakkestuen [NDD] |
|
#4
|
|||
|
|||
|
Eivind,
| I suspect the majority of users would be appalled if the database | engine deleted records without further ado. I'm afraid you'll need to | check manually wether existing data fulfils the ref int constraints. | The engine can't really know what you'd want do to with records that | doesn't. I'm glad you typed that. <g> Way back, in the dim distant past, when I was using Paradox, with Referential Integrity related tables, I routinely checked returned records for that "integrity" and sent them off to a special table for review if they did not pass the RI test. -- Q 02/14/2012 11:37:11 XanaNews Version 1.19.1.278 [Q'sBrokenToolBar] |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Referential Integrity | pierrotsc | nexusdb.public.support | 2 | 25th January 2012 12:18 PM |
| Referential integrity question.. | Roberto Nicchi | nexusdb.public.support | 7 | 2nd December 2008 08:24 PM |
| Referential Integrity | Mark Mitton | nexusdb.public.support | 1 | 3rd March 2006 01:09 PM |
| Re: V2 and referential integrity | Robert Meek | nexusdb.public.support | 1 | 13th March 2005 09:14 AM |
| Referential integrity! | Atmapuri | nexusdb.public.support | 6 | 30th September 2003 08:45 AM |