PRB: Changing Field Settings of a Table Deletes Relationships

Last reviewed: October 29, 1996
Article ID: Q157404
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, version 5.0

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.

MORE INFORMATION

Steps to Reproduce Behavior

  1. 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))
    

  2. Modify the database and the TST1 table. Set Tst1.Fld1 as the primary key for this table. Save changes and exit the Table Designer.

  3. Modify the Tst2.dbf file and set Tst2.Fld1 as the regular key. Save changes and exit the Table Designer.

  4. In the Database Designer click on Tst1.Fld1 and drag it to Tst2.Fld1 to create a Parent Child relation between Tst1 and Tst2.

  5. Modify the Tst1.dbf file and select the Fields tab.

  6. Make any of the following changes to Tst1.Fld1:

    - Select(check) the NULL option. - Change the field width.

  7. Save changes and return to the Database Designer.

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


KBCategory: kbtool kbprb
KBSubcategory: FxtoolDbtabledes
Additional reference words: 5.00 kbdse VFoxWin



THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: October 29, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.