By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,829 Members | 1,798 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,829 IT Pros & Developers. It's quick & easy.

The "alter table" statement conflicted with Foreign key consrtaint

P: 15
I have created Two tables

1]EmployeeTable
--------------------------
EmpID [ bigint] [PrimaryKey]
EmpName [ varchar(50)]
AccessLevelID [bigint ] [ Foreign Key]

2]AccessLevelTable
-----------------------------
AccessLevelID [ bigint ] [ PrimaryKey ]
AccessLevelName [varchar(50)]


Now i am creating relationship between these two tables.
I select relationship option for first table.
Then I added new relationship by selecting primary table field and foreign key table field.
Afterall when i am trying to save these changes I get one error
"The ALTER table Statement conflicted with foreign key constraint".
Can anyone help me as soon as possible.
Thanks in advance
Nov 26 '08 #1
Share this Question
Share on Google+
3 Replies


ck9663
Expert 2.5K+
P: 2,878
What relationship are you creating on which field?

-- CK
Nov 27 '08 #2

P: 11
wish this could help:
check the identity property in your primary key table...
Aug 10 '10 #3

NeoPa
Expert Mod 15k+
P: 31,426
Check the properties of [EmployeeTable].[AccessLevelID] to make sure there is nothing which is incompatible with the field being used as a foreign key. The one that first springs to mind is the Nullable property (Allow Nulls).

Welcome to Bytes!
Aug 10 '10 #4

Post your reply

Sign in to post your reply or Sign up for a free account.