469,951 Members | 2,392 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,951 developers. It's quick & easy.

MS ACCESS - ON DELETE CASCADE Problem

I cannot execute my sql to create a table with ON DELETE CASCADE option.
Here is my sql:

CREATE TABLE Employees (Name Text(10) not null, Age number,
CONSTRAINT pkEmployees
PRIMARY KEY (Name)); <--- This is ok!

CREATE TABLE CanTake (Name Text(10) not null, Make Text(10) not null,
CONSTRAINT pkCanTake
PRIMARY KEY (Name, Make),
CONSTRAINT fkCanTake
FOREIGN KEY (Name) REFERENCES Employees
ON UPDATE CASCADE <--- MS-ACCESS says 'syntax error'
ON DELETE CASCADE
);

When I didn't include ON UPDATE CASCADE ON DELETE CASCADE in sql, it works
(but that's not what I want). Why? Could anyone suggest me?
Thank you.

--
Message posted via http://www.sqlmonster.com
Jul 23 '05 #1
2 11179
MSDN suggests that you need to use ALTER TABLE to add cascading DRI:

http://msdn.microsoft.com/library/de...l/acintsql.asp

However, I know very little about Access, so I suggest you post in an
Access group to get a better response.

Simon

Jul 23 '05 #2
Thank you.

--
Message posted via http://www.sqlmonster.com
Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by cfxchange | last post: by
9 posts views Thread by Robert Schneider | last post: by
49 posts views Thread by Yannick Turgeon | last post: by
3 posts views Thread by John Rivers | last post: by
2 posts views Thread by Meaney | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.