Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Composite primary keys
Message
From
02/12/2004 14:03:24
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
02/12/2004 11:21:23
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00966059
Message ID:
00966476
Views:
7
>OK, I think I got the point now. After relations are created, VFP still does nothing at all to prevent entries breaking the foreign key rule. If I want a real foreign key, I must run the Referential Integrity Builder on my DB. Of course with the drawback that if I change something to the DB and forget to run the builder, I can create a disaster.

Yes; every time you draw the relationship, you must review the RI-builder. RI is not enforced by default (all rules are set to "ignore").

>And if I read your article correctly, the other annoying thing is that the referential integrity builder will always disallow to set a field to null in the child table, even if the field is defined as nullable ; only the external TaxRI builder would allow this. Right ?

I wrote that? I never tried to set fields to null. But TaxRI does have some additional options. And, the generated code is about 10 times more compact (and readable).

There are also alternative RI-builders, but I haven't tried them.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform