Syntax error in CONSTRAINT

G

Guest

I to everybody!

I created a query like this in Access:

ALTER TABLE Ordini
ADD CONSTRAINT FKOrdiniIdCliente
FOREIGN KEY (IdCliente) REFERENCES tm_Cicli (ProductID)

It works rightly!
If I add two more commands

ALTER TABLE Ordini
ADD CONSTRAINT FKOrdiniIdCliente
FOREIGN KEY (IdCliente) REFERENCES tm_Cicli (ProductID)
ON UPDATE CASCADE
ON DELETE CASCADE

I receive a syntax error:
"Syntax error in CONSTRAINT"

Does anybody know why? I read the documentation and the syntax seams correct!

Thank you very much!



----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/com...aaee941ee5&dg=microsoft.public.access.queries
 
G

Guest

Hi Corrado,

Have you enabled ANSI-92 extensions in your database? I believe that you
can only set the referential integrity options via sql if you have.

HTH, Ted Allen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top