Enforcing Referential Integrity 
Author Message
 Enforcing Referential Integrity

VB 5.0 front-ending Access 97 database.  I have two tables that are linked
using relationships in Access 97.  I thought that the Jet DB Engine would
utilize the Access 97 relationships.  Evidently it doesn't, or I'm doing
something wrong.

From Access, deleting a record does so in both tables.  In VB, the .DELETE
command just deletes the record in one table.  I could manually code my own
form of referential integrity, but that would be clunky...it seems to me
that I shouldn't have to do that.  Could anyone offer some suggestions to

Thanks



Fri, 29 Sep 2000 03:00:00 GMT  
 Enforcing Referential Integrity

On Mon, 13 Apr 1998 13:59:26 -0400, "Jeff Mays"

Quote:

>VB 5.0 front-ending Access 97 database.  I have two tables that are linked
>using relationships in Access 97.  I thought that the Jet DB Engine would
>utilize the Access 97 relationships.  Evidently it doesn't, or I'm doing
>something wrong.

>From Access, deleting a record does so in both tables.  In VB, the .DELETE
>command just deletes the record in one table.  I could manually code my own
>form of referential integrity, but that would be clunky...it seems to me
>that I shouldn't have to do that.  Could anyone offer some suggestions to


Yes, you're doing something wrong -- but I'm not clear what. The
relationships are set in the Jet Database (Access is just another
front end), and are obeyed in all settings.

Just to be clear: you did create the relationship in the Edit
Relationships window, and you did set Enforce Referential Integrity,
didn't you? In which case, if VB deletes just a parent record from the
database, it would leave an orphaned record (or records) in the child
table, which would be a violation of ref. integ.

I guess you need to check that you created the relationship correctly.

Best

Tim Ferguson



Sat, 30 Sep 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Enforce Referential Integrity

2. Problems Enforcing Referential Integrity using Autonumber field

3. Enforce referential integrity in a disconnected recordset?

4. Create relationship without enforcing Referential Integrity

5. How to set off 'Enforce Referential Integrity' in MS-Access

6. Enforce Referencial Integrity by code

7. Transaction w Referential Integrity Problem

8. Nulls in Referential Integrity

9. Referential Integrity

10. Referential Integrity

11. Referential Integrity violations being allowed: BUG????

12. Deleting and Referential Integrity

 

 
Powered by phpBB® Forum Software