dbTalk Databases Forums  

MS ACCESS - ON DELETE CASCADE Problem

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss MS ACCESS - ON DELETE CASCADE Problem in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
P.B. via SQLMonster.com
 
Posts: n/a

Default MS ACCESS - ON DELETE CASCADE Problem - 04-05-2005 , 10:05 PM






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

Reply With Quote
  #2  
Old   
Simon Hayes
 
Posts: n/a

Default Re: MS ACCESS - ON DELETE CASCADE Problem - 04-06-2005 , 02:33 AM






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


Reply With Quote
  #3  
Old   
Pimonpun B via SQLMonster.com
 
Posts: n/a

Default Re: MS ACCESS - ON DELETE CASCADE Problem - 04-07-2005 , 12:56 AM



Thank you.

--
Message posted via http://www.sqlmonster.com

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.