Microsoft KB Archive/157404

= PRB: Changing Field Settings of a Table Deletes Relationships =

Article ID: 157404

Article Last Modified on 10/15/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 6.0 Professional Edition

-



This article was previously published under Q157404



SYMPTOMS
If the field settings of a table in a database are modified, any relationships to other tables that are based on that field are deleted.



CAUSE
When the field settings of a table are changed, the dependent indexes get dropped and rebuilt, and when an index is dropped, relations referring to it are dropped as well.



STATUS
This behavior is by design.



Steps to Reproduce Behavior
  Create a database with two tables as follows: CREATE DATABASE test CREATE TABLE Tst1 (Fld1 c(5),Fld2 c(5)) CREATE TABL Tst2 (Fld1 c(5),Fld2 c(5))  Modify the database and the TST1 table. Set Tst1.Fld1 as the primary key for this table. Save changes and exit the Table Designer. Modify the Tst2.dbf file and set Tst2.Fld1 as the regular key. Save changes and exit the Table Designer. In the Database Designer click on Tst1.Fld1 and drag it to Tst2.Fld1 to create a Parent Child relation between Tst1 and Tst2. Modify the Tst1.dbf file and select the Fields tab. Make any of the following changes to Tst1.Fld1:

<ul> Select(check) the NULL option.</li> Change the field width.</li></ul> </li> Save changes and return to the Database Designer.</li></ol>

The Relation between the two tables has been removed, so you need to re- create it.

Additional query words: kbdse VFoxWin

Keywords: KB157404

-

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

© Microsoft Corporation. All rights reserved.