PRB: Changing Field Settings of a Table Deletes Relationships
ID: Q157404
|
The information in this article applies to:
-
Microsoft Visual FoxPro for Windows, versions 5.0, 6.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
- 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:
- Select(check) the NULL option.
- Change the field width.
- Save changes and return to the Database Designer.
The Relation between the two tables has been removed, so you need to re-
create it.
Additional query words:
kbdse VFoxWin
Keywords : kbVFp500 kbVFp600 FxtoolDbtabledes
Version : WINDOWS:5.0,6.0
Platform : WINDOWS
Issue type :