Microsoft KB Archive/131460

= PRB: Referential Intregrity Builder Leaves Code Behind =

Article ID: 131460

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 Q131460



SYMPTOMS
The Referential Integrity (RI) Builder leaves code in the Stored Procedures even when all the Trigger options are set to IGNORE.



WORKAROUND
The RI Builder copies the existing contents of the Stored Procedures to a file called RISP.OLD before it makes any changes, so you can recover modified procedures and paste them into the current Stored Procedures.



STATUS
Microsoft is researching this behavior and will post new information here in the Microsoft Knowledge Base as it becomes available.



Steps to Reproduce Behavior
  Type the following commands in the Command window: CREATE DATABASE mydbc CREATE TABLE myparent (id c(3) PRIMARY KEY, fname c(20), lname c(25)) CREATE TABLE mychild ; (id c(3), fname c(20), FOREIGN KEY id TAG id REFERENCES myparent TAG id) MODIFY DATABASE  Double-click the Persistent Relation line that connects the two tables. This brings up the Edit Relationship dialog box Click the Referential Integrity button to invoke the RI Builder. In the RI Builder, change any of the Triggers from "Ignore" to something else such as "Restrict." Click the OK button, and answer "Yes" to the dialog boxes that follow. In the Edit Relationship dialog box, click OK. Enter the Stored Procedures, note the code the RI Builder produced. There should be one or more specific procedures depending how many changes were made in Step 4. These specific procedures have the table name as part of the procedure name. The rest of the procedures are generic (no table name in the procedure name).</li> Return to the top of the Stored Procedure file.</li> Add a comment to the "RIDELETE" procedure.</li> Close the Stored Procedure Window.</li> Repeat Steps 2 and 3 above.</li> Set all the Triggers back to "Ignore."</li> Repeat Steps 5 and 6.</li> Note the generic procedures that the RI Builder created are still in existence but the comment created in Step 8 is gone.</li>  Type the following command in the Command window: MODIFY FILE RISP.OLD </li> Note the comment made in Step 8 exists here. You could cut and paste this procedure back into the current Stored Procedures file.</li></ol>

Additional query words: VFoxWin

Keywords: KB131460

-

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

© Microsoft Corporation. All rights reserved.