G
Guest
I have a dataset with many tables in it. Two of them are Persons and
Objects. An object may or may not belong to a person. I'm reading in an XML
document for my data source and creating a parent/child relationship between
Persons(parent) and Objects(child). When the object doesn't belong to a
person, there is no value in the Person_Id node of the Objects table. Null
is a valid value for the Person_Id in the objects table in my DB. When I
have a value for Person_Id in my objects table everything works fine when I
use the data adapter update method to insert the data. When an Object has a
null node for Person_Id, I'm getting an error that the constraint can't be
created.
Its obvoius why this is happening, but I need to know if there is some way I
can tell the dataset/dataadapter/relation objects to only check the
parent/child relationship when a Person_Id exists in my object?
Objects. An object may or may not belong to a person. I'm reading in an XML
document for my data source and creating a parent/child relationship between
Persons(parent) and Objects(child). When the object doesn't belong to a
person, there is no value in the Person_Id node of the Objects table. Null
is a valid value for the Person_Id in the objects table in my DB. When I
have a value for Person_Id in my objects table everything works fine when I
use the data adapter update method to insert the data. When an Object has a
null node for Person_Id, I'm getting an error that the constraint can't be
created.
Its obvoius why this is happening, but I need to know if there is some way I
can tell the dataset/dataadapter/relation objects to only check the
parent/child relationship when a Person_Id exists in my object?