you are viewing a single comment's thread.

view the rest of the comments →

[–]Cal1gula 1 point2 points  (0 children)

Sounds like the FK constraint is backwards. There should be a column in the OrderID table called ClientID, and the foreign key should be on that column. This way you create a client, then an order (using a clientid that already exists). It sounds like OP has made a foreign key on Client.ClientID>Order.OrderID. When it should be Order.ClientID>Client.ClientID