472,145 Members | 1,421 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,145 software developers and data experts.

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 7117
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,499 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 leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.