G
Guest
I'm trying to create relationships through SQL following the Microsoft Jet
SQL help documents. I can create the the relationship ok using ADD
CONSTRAINT, but I can never get it to work if I include the ON UPDATE or ON
DELETE clauses. For example, this works fine:
ALTER Table Session
ADD CONSTRAINT DelPup
FOREIGN KEY(sumPupID)
REFERENCES Pupils
However, if I add the ON DELETE as follows,
ALTER Table Session
ADD CONSTRAINT DelPup
FOREIGN KEY(sumPupID)
REFERENCES Pupils
ON DELETE CASCADE
it fails with the message 'Syntax error in Contraint clause'
Has anybody been able to make it work?
SQL help documents. I can create the the relationship ok using ADD
CONSTRAINT, but I can never get it to work if I include the ON UPDATE or ON
DELETE clauses. For example, this works fine:
ALTER Table Session
ADD CONSTRAINT DelPup
FOREIGN KEY(sumPupID)
REFERENCES Pupils
However, if I add the ON DELETE as follows,
ALTER Table Session
ADD CONSTRAINT DelPup
FOREIGN KEY(sumPupID)
REFERENCES Pupils
ON DELETE CASCADE
it fails with the message 'Syntax error in Contraint clause'
Has anybody been able to make it work?