SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2011
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Error when Saving tables in SQL

    Hello all,

    I'm following a book by sitepoint called 'Build your own ASP.NET 4 website' and I've come across a problem. I created a database diagram but when I save it I get the following message and I'm not sure how to fix it. Can anyone shed some light please as I have gone over the chapter in the book to make sure I haven't missed out something but everything seems to be right. I just can't seem to figure it out.
    thank you.

    Code:
    'HelpDeskStatus' table saved successfully
    'HelpDeskSubjects' table saved successfully
    'HelpDeskCategories' table saved successfully
    'Departments' table saved successfully
    'Employees' table
    - Unable to create relationship 'FK_Employees_Departments'.  
    The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_Employees_Departments". The conflict occurred in database "HelpDesk", table "dbo.Departments", column 'DepartmentID'.

  2. #2
    SitePoint Enthusiast
    Join Date
    Dec 2011
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok I figured it out in the end. Don't worry haha


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •