Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Sql Error Report Help

Author  Topic 

Easwar
Yak Posting Veteran

59 Posts

Posted - 2007-03-07 : 05:16:51

Error:

The INSERT statement conflicted with the FOREIGN KEY constraint "FK_yaf_Forum_yaf_Category". The conflict occurred in database "yafnet", table "dbo.yaf_Category", column 'CategoryID'.
The statement has been terminated.


How to solve this error...........

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-03-07 : 05:23:08
Don't insert values not present in the PRIMARY KEY relationship!


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-03-07 : 05:24:36
INSERT values into table yaf_Category first.
And then later into table yaf_Forum.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page
   

- Advertisement -