I guess u can try something like the following
Dim relation As DataRelation
For Each relation In dsdata.Relations
relation.ChildKeyConstraint.AcceptRejectRule = AcceptRejectRule.None
relation.ChildKeyConstraint.DeleteRule = Rule.None
relation.ChildKeyConstraint.UpdateRule = Rule.None
Next relation
then you can put back the constarints.
>I have not changed the constraints to anything at runtime yet, that is what I am trying to do.
>
>>Einar did you try to change the constraints to none and when finished change it back to whatever it was?
>>
>>>How can I at runtime change all my relations in my dataset from "Both relation and foreign key constraint" to "Relation only"? (don't worry I will change it back later <s>)
>>>
>>>Thanks,
>>>Einar
Alexandre Palma
Senior Application Architect