469,307 Members | 2,172 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,307 developers. It's quick & easy.

The "alter table" statement conflicted with Foreign key consrtaint

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
3 6996
ck9663
2,878 Expert 2GB
What relationship are you creating on which field?

-- CK
Nov 27 '08 #2
bougie
11
wish this could help:
check the identity property in your primary key table...
Aug 10 '10 #3
NeoPa
32,173 Expert Mod 16PB
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.

Similar topics

3 posts views Thread by Hans-Dieter Franz | last post: by
2 posts views Thread by Alanoly J. Andrews | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.