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
 SQL Server 2008 Forums
 Other SQL Server 2008 Topics
 Multiple parent foreign keys required

Author  Topic 

arraysys
Starting Member

12 Posts

Posted - 2010-09-13 : 04:08:58
SQL 2008: I have a customer table with city and state rows; I have set FKconstraints from City table and State table as FKCity_Customer and FKState_customer set to parent_child.

This seems incorrect as their are now 2 parents to customers ( and I will need a few more) and seems to be preventing the FKconstraints from operating correctly.

Does anyone have a suggestion on how to handle multiple lookups with the necessary FKconstraints in place?



Array

Ancy
Starting Member

23 Posts

Posted - 2010-09-13 : 05:59:35
What is the problem that you are facing with the constraints?
Go to Top of Page

arraysys
Starting Member

12 Posts

Posted - 2010-09-13 : 06:06:15
quote:
Originally posted by Ancy

What is the problem that you are facing with the constraints?



Problem 1:

To get the contraint to throw an exception (meaning prevent a delete due to value existing in child and show an exception message to the user) I have to drag a child instance (tableadapterFill.dataset) onto the parent form (cities)!

Prob 2: this only works in the first parent instance (cities); a second parent (states) will just not perform at all...

Array
Go to Top of Page
   

- Advertisement -