This topic is locked

referential integrity

3/24/2005 7:13:34 AM
ASPRunnerPro General questions
G
gopi author

Hi
We are evaluating ASP runner, we have created a simple access DB with following table and fields :-
Table _ 1 : group
Field: idgrp ( primary Key )

Field: grpname
Table _2 : name
Field : idname (primary key )

Field : name

Filed : idgrp ( same as in group table )
We have added few records in table group and name and generated the required pages successfully.
The problem is when we delete the group, it get deletes without validating with the name filed records exists under that group, we would like to know how to prevent group getting deleted when there is a record under the group " Is there is any way to get an dialog box showing records exists under this group. Before deleting the group delete the records which exists under this group".
Look forward to receive your reply.
gopi

Sergey Kornilov admin 3/24/2005

Hi,
You need to setup referential integrity in your MS Access database.
To do this open the database relationship diagram and add both tables. Then drag-and-drop first table's primary key to second table's primary key.

Check off the Enforce referential integrity checkbox.
I hope this helps.