Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Are persistent relationships trustworthy?
Message
From
10/04/1998 10:14:51
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00090633
Message ID:
00091038
Views:
23
>In my database designer I'm assigning relationships between all the primaries keys in my tables, that then I drag onto the forms I'll be using. My boss, who knows some VFP says they are not truly reliable and that it's better to create your own as you go. What do you guys think?

It depends on how complicated your relationships are. I discovered the hard way that you cannot have persistent relationships between one parent table and many children table.

Example:

In my database designer, I have ParentTable, ChildTable1, ChildTable2, and ChildTable3. These tables all have the same primary key, and there is a 1:1 relation between ParentTable and ChildTable1, between ParentTable and ChildTable2, and between ParentTable and ChildTable3 (One of my fellow developers thought it would be better to have four small tables rather than one big one). I was able to establish this persistent relationship in the database designer.

However, when I put these tables into my form's data environment, the relationship between ParentTable and ChildTable1 comes over, but the one between ParentTable and childTable2 and between ParentTable and ChildTable3 does NOT come along. The data environment won't let me create the relationship visually either. I was forced to remove the relationship between ParentTable and ChildTable1 in my data environment, and then create all the relationships with code (SET RELATION..., SET SKIP...) in the data enviornment's Init method.

Later, I had the same problem when there was a true 1:m relationship between a parent table and two child tables. One of the relationships came over, but the other did not. I had to remove the one that came over before creating the other relationship through code.

Caveat hacker,

Bill
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform