Alert Table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i am trying to update a dabase in the field from a program.
now i have created a new table and wish to add a refernces to the new table
to a table that i have add a field to..

the following code has a "syntax error in the CONSTRAINT claues." Error
which is of no help at all..

ALTER TABLE Exam ADD
CONSTRAINT FK_Exam_Grading FOREIGN KEY
(
GradingBand
) REFERENCES Grading (
GradeID
) ON UPDATE SET NULL ON DELETE SET NULL
GO

if i remove the "ON UPDATE SET NULL ON DELETE SET NULL" it works, but put
in the wrong type of releationship in to the database.

as any one got any ideas?

"Yes i have looked at the ACCESS Help file for the Jet eng..." and a lot of
good that did..
 
the following code has a "syntax error in the CONSTRAINT claues." Error
which is of no help at all..

Depends how you are trying to execute the DDL. The DAO Jet library has a
much less capable dialect of SQL and I am certain that this will not run in
that. ADO does have access to CASCADE DELETE and stuff, but my memory is
that SET NULL is not implemented. In any case, I'd try this with ADO first.
If it still fails then either (a) live with it or (b) upgrade to a real
database server like SQL Server -- the express version is still free and
very capable.

Hope that helps


Tim F
 
Thanks, that comfrems what i found out, i would love to move to MSDE, but
this is not pratical at this time... dead line is too close...

thanks for you help..

Tony Dixon
 

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

Back
Top