Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Relating Two Tables
Message
From
14/12/2005 12:54:28
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01077578
Message ID:
01077945
Views:
26
>For some reason, when I am relating two tables, the child table is showing non-matching records until I open up the parent table in a Browse window. Since I don't want the end user to BROWSE, can anyone tell me why the relationship isn't taking effect immediately (without Browsing)?
> My code is:
>
>SELECT Child
>SET ORDER TO ChildIndex
>SET RELATION TO ChildField1 INTO GrandChild1,;
> ChildField2 INTO GrandChild2
>
>SELECT Parent
>SET RELATION TO ChildKey INTO Child
>SET SKIP TO Child
>SET ORDER TO ParentIndex
>SEEK ThisForm.KeyValue IN Parent
>
> I have other table relations, but they don't involve the relation between Parent and Child, which is where I'm having the problem. (The other table relations involve the child and grandchildren tables.)
> Since there already is a framework for the project, putting the relationship into the Data Environment is not an easy option. I was having this problem with grids earlier, but I was able to resolve it by programming the data sources, instead of using the Properties window. However, my code isn't working here. Any ideas?

My WAG, after reading the thread so far, is that you may try to Select Parent. That's the only thing that browse would do that you aren't already doing in your code. Try to do that just before the Seek.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform