Microsoft KB Archive/145752

= How to Eliminate RI Rule Code from a .DBC File =

Article ID: 145752

Article Last Modified on 9/30/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition
 * Microsoft Visual FoxPro 3.0b Standard Edition

-



This article was previously published under Q145752



SUMMARY
This article explains how to remove the Referential Integrity rules from a database container (.dbc file) object.



MORE INFORMATION
There may be circumstances where you have added Referential Integrity (RI) to a database but then later decide you no longer want the RI code in the database. You can start over after deleting all the old RI rules.

the safest (and preferred) way to do this is to go into the Referential Integrity builder and set all options (Update, Delete, and Insert) on the tables to Ignore. Then generate the RI code again. This method will eliminate the stored procedures in the database. This process is tedious, however, and if the .dbc file contains many tables, it may take a long time. Also, the RI Builder puts some default code into the stored procedures even when Ignore is chosen, but the code isn't used unless RI code (Cascade or Ignore) is generated.

CAUTION: The following method will remove any and all stored procedures from your database container. This means that if you have any custom code in SPs, the code will be deleted. Therefore, you should use the following method only in cases where you only want to strip out RI code.

Alternatively, you can open the .dbc as a table and manipulate the code manually. The following commands create the same end result as the first method: REPLACE ALL Riinfo with '' REPLACE CODE WITH "" FOR Objectname='StoredProceduresSource' or ; Objectname='StoredProceduresObject'

Additional query words: VFoxWin delete

Keywords: KB145752

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.