Syntax error in CONSTRAINT

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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
 
Back
Top