title: SQL Foreign Key Constraint doesn't allow relationship
body: <p>I'll get straight to the point.
  I'm building a website on an existing database, which did not have relationships to keep it consistent. I'm now trying to add relationships to take care of this consitency problem.</p>
  
  <p>simplified:
  I have a stock items table, locations table and a parts table. </p>
  
  <p>the stock items table uses ID's that can be found in other tables (foreign keys). this table uses multiple columns as primary key (including locationid and partnr + some other)
  I succesfully added a relationship between the Location ID in the stock items table and the locations table.
  The problem occurs when I try to add the relationship between the stock items table and parts table:</p>
  
  <p>The ALTER TABLE statement conflicted with the FOREIGN KEY constraint (in the parts table, partnumber table).</p>
  
  <p>I checked the constraints and none were there.
  I tried looking for references to unexisting parts, but I could have written a bad query ...</p>
  
  <p>can anyone help me figure out how to fix this?</p>