Hello,
I found a 1999 discussion on this subject (thread #
291533), but I was wondering whether something new happened since.
I need to enforce referential integrity between a child and a parent table, with the possibility of having a null value in the child table. Examples are numerous where this design is useful, let's have for instance an employee table, where every employee has a boss except the big boss (boss of the big boss=NULL).
Apparently, like in 1999, the VFP RI builder still does not handle this situation. The insert rule has two options, "ignore" which does nothing, and "restrict" which refuses null values.
I was told about the TaxRI builder, written by Walter Meester, which did not handle null values, but at least blank values. I tried that one, but there seems to be a bug which makes it crash just at the time I choose "allow blank" (not VFP9-compatible?).
Thread #
291533 referred to a book by Steve Sawyer with RI code in it, but unfortunately I am not really interested in code that I have to maintain each time I change the database ; it will be huge and change often in its first stages, so it will need a builder.
A workaround would be to add a sort of "zero record" to each parent table. This would certainly do the job, but doesn't look as solid a design, and would certainly prepare us some problems when we will have to migrate to another RDBMS.
Any help will be appreciated !
Regards,
David