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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cascading Delete

Status
Not open for further replies.

dsmith1000

Programmer
Nov 21, 2001
8
US
Hello,
I am having a little trouble with a cascading delete. I want all the people that are signed up for a class in my "students" table to be deleted when the class is deleted from my "classes" table. I am using ASP to execute an Access query that will delete the old classes when they expire. The problem is that I can't build a relationship between the "ID" (autonumber) in the class table and the foreign key "classID" (text) in the students table to allow the cascading delete. It says the fields have to be of the same datatype for this link.

Any suggestions? Appreciate any help,
dave
 
Can't you make the ID field in the Class table the same as that in the Student table?

Nick
 
Can't you make the ID field in the Class table the same as that in the Student table? Then use code to get the Max Class id and add 1, instead of using the autonumber.

Nick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top