Whats wrong with this SQL statement?

J

jacobh

Hi

Whats wrong here ??

ALTER TABLE TableA
ADD CONSTRAINT AB
FOREIGN KEY (BID)
REFERENCES TableB(BID)
ON DELETE CASCADE

I get synteax error highlighting "DELETE". If I remove the "ON DELETE
CASCADE" its fine.... I'm stuck.

I use Access 2003...

Thanks for your help!
Jacob Havkrog
 
V

Van T. Dinh

Most examples I have seen include a space between the referenced Table and
its Field list like:

REFERENCES TableB (BID)

If this is not the problem, try running your SQL (with the space above)
using ADO / OLEDB rather than through the GUI or DAO. Some new elements of
JET 4 are only supported through ADO / OLEDB.
 

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