Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Referencial Integrety Triggers not removed
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00089026
Message ID:
00090441
Views:
29
>>>>>I created a database with about 38 tables and have been experimenting with data conversion loads from 2.6. My procedure is to create a load program, load the data, index the table, set up referential integrety between the new table and several lookup tables (having cascade, restrict, restrict as the parent child options), and perform several test on the data. When I find a problem with the table structure or my normalization methods, I make modifications to the table and do the above again. My question is this, I use the Database designer to remove my referential integrety between the tables (highlighting the line connecting the tables and pressing the delete key). What I have been finding is that the insert and update triggers are not removed from the table and my load programs fail. I have to manually delete the triggers in the tables to get rid of them. Am I doing something wrong here (order wise) or does VFP have a problem with cleaning up after itself when referential
>>>>>integrety is removed?
>>>>>
>>>>>TIA
>>>>
>>>>To get rid of triggers you should rebuild RI, clicking Ok in RI Builder, i.e. you can just set appropriate rule to Ignore and rebuild without removing links.
>>>
>>>Hello Edward
>>>
>>>If all my relationships are removed (lines connecting tables in DBC) where would I access rebuild RI from, as edit referential integrety is not highlighted anymore in the database pulldown menu?
>>
>>Right, and the idea is not to remove these links but just change RI rule to 'Ignore'. If you already deleted all links, then recreate at least one of them, go to RI builder and click Ok.
>
>Doesn't this seem kind of buggish to you, if I remove the link from the database designeer, shouldn't FoxPro ask me to run the RI builder to clean up after itsself? My main question delt with am I doing things the right way, well it sounds like I am, but FoxPro is not reacting the way it should logically if all links are removed. If I dont need links while processing I should be able to remove them and not have to leave them and the code in place and just change the rules to ignore. I think the database designer pull down menu should never be disabled for referential integrity so you can rebuild after all connections are removed.

Hi Brett -

I had a question about your original scenario, which sounds a lot like something I'm having trouble with at present. I also had a number of tables linked to lookups with Cascade, restrict, restrict. But I found I was always getting errors on update with that restrict on update, so switched to ignore. Is that what you ultimately decided to do, that is, go with ignore on update? BTW, I found the same problem you did when removing all the visual RI connections, and did have to restablish one just to clean up the RI code in the DBC.

Sylvia
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform