RE: Foreign Keys On SQLServer
RE: Foreign Keys On SQLServer
- Subject: RE: Foreign Keys On SQLServer
- From: "Paul-Liviu Petrus" <email@hidden>
- Date: Tue, 25 Feb 2003 10:22:04 +0100
- Thread-topic: Foreign Keys On SQLServer
I don't know which version of SQL Server you are using, but I had the
same problem with SQL Server 7.0. You could try it also on SQL2K.
The 'incorrect syntax' seems to come from the 'dbo' prefix before the
foreign key name (Application..SecurityGroup_FK). I always used to
copy-paste the ALTER TABLE sequence into the Query Analyzer and test it
there. After I removed the dbo prefix, the syntax was OK and I could
create the key.
Hope this helps!
Paul
-----Original Message-----
From: Riaz Lalehzari [mailto:email@hidden]
Sent: Dienstag, 25. Februar 2003 02:23
To: email@hidden
Subject: Foreign Keys On SQLServer
Hello there...
I have some many-to-many relationships (using the standard join table,
flattening etc). All relationships are done on the EOModel and I have
not
made any changes to the actual database (it's basically a list of tables
without relationships). When I try to generate the sql for the model,
when
it gets to the 'ALTER TABLE section that specifies foreign key details
it
has a problem - Below is the error...
Error from JDBC adaptor: EvaluateExpression failed:
<MicrosoftPlugIn$MicrosoftExpression: "ALTER TABLE
dbo.ApplicationFunctionSecurityGroup ADD CONSTRAINT
dbo.ApplicationFunctionSecurityGroup_securityGroup_FK FOREIGN KEY
(SecurityGroupID) REFERENCES dbo.SecurityGroup (ID)">:
Next exception:SQL State:HY000 -- error code: 170 -- msg:
[Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Line 1: Incorrect
syntax near '.'.......
I've seen other people having the same problem on the mailing list but
there
were no answers posted that I could find.
As always, thanks for the assistance.
Riaz
_________________________________________________________________
MSN Instant Messenger now available on Australian mobile phones. Go to
http://ninemsn.com.au/mobilecentral/hotmail_messenger.asp
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.