Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

retrieve constraint name as param and cascade relationship

Status
Not open for further replies.

virginie

Programmer
Jul 24, 2002
53
IL
i need, via query(ms access queries), add cascade of update and delete to enforce referential integrity.

i did:
ALTER TABLE Table2 ADD CONSTRAINT Relation1 FOREIGN KEY ([a],)
REFERENCES Table1 ([c],[d]) ON_DELETE_CASCADE_ON_UPDATE_CASCADE ;

it really show link between tables 1:n
but not allowed cascade of update, or delete, like if i do it manually on the relationship window.
why??

i need to send in my query "relation1", i mean constraint name as parameter that i am supposed to retrieve with another query .
how can i do all that??
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top