Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / May 2006

Tip: Looking for answers? Try searching our database.

Alert Table

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tony Dixon - 26 May 2006 10:31 GMT
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..
Tim Ferguson - 26 May 2006 20:07 GMT
=?Utf-8?B?VG9ueSBEaXhvbg==?= <TonyDixon@discussions.microsoft.com> wrote in
news:C4D1F8A0-D321-4F42-B48C-9363804328C5@microsoft.com:

> 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
Tony Dixon - 26 May 2006 20:31 GMT
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

> =?Utf-8?B?VG9ueSBEaXhvbg==?= <TonyDixon@discussions.microsoft.com> wrote in
> news:C4D1F8A0-D321-4F42-B48C-9363804328C5@microsoft.com:
[quoted text clipped - 13 lines]
>
> Tim F
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.