It's a bit of work but... You can add a "null value" record into table A. Let's say it has a value -1 in the ID column. Then on filling in the table B replace nulls in B.ID_A with -1.
Alexander Shirshov On Fri, 25 Feb 2005 20:53:20 -0500, Raj Malli <[EMAIL PROTECTED]> wrote: > Hi guys > > I have a dataset with two tables A and B. A's primary key field ID is a > foreign key field ID_A in table B (I set this relation up in the dataset > using the "Edit Relation" UI screen). Now, is it possible that ID_A be a > nullable field? (My business rule is this: If ID_A is non null, a > corresponding parent row needs to exist in table A). > > I have specified ID_A as a nullable field in the Sql Server 2000 DB, but > do not know to specify that in the data relation. Currently, if I set ID_A > to null in the dataset, I get a constraint violation thrown. > > Any pointers are appreciated > > Thanks > Raj > > =================================== > This list is hosted by DevelopMentor� http://www.develop.com > > View archives and manage your subscription(s) at http://discuss.develop.com > =================================== This list is hosted by DevelopMentor� http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com
