Re: DataEnvironment
From: Cindy Winegarden (cindy.winegarden_at_mvps.org)
Date: 03/30/04
- Next message: Ben Lai: "XMLAdapter class"
- Previous message: HSalim: "FoxPro Stored Procedures"
- In reply to: Marc Kayser: "Re: DataEnvironment"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 30 Mar 2004 10:41:03 -0500
In news: 209EBA3A-6E47-4918-95D1-AFA9B3D5A152@microsoft.com,
Marc Kayser <anonymous@discussions.microsoft.com> wrote:
> Hi Stefan,
> I found a solution that works.
> In the DE I set the property OneToMany = .F. of the first relation
> (Customers -> Accounts) although in my perception IT IS is a one to
> many relation, and I set the property OneToMany = .T. of the second
> relation (Accounts -> Years, as proposed by the DE) although in my
> perception this should be a Years -> Accounts relation, the many side
> is in the Accounts-table. I'm really puzzled about this.
> Seeing your example, I'm even more confused as you also Set the
> Relations from the One to the Many sides.
>
> Below, a short description of the DB's structure.
> Table Customer: Customers that are allocated a yearly grant, hence the
> Table Accounts: with the result of the yearly calculations depending
> on variables stored in this table and the
> Table Year: with group and yearly variables as the customers are
> member of one group
> Did you get the picture?
> Thanks
> Marc
Hi Marc,
Try opening your two "parent" tables in the VFP IDE and setting the
relations manually. To do this you'll need something like this:
Use Customers In 0
Use Years In 0
Use Use Accounts In 0 Order CustomerID
Select Customers
Set Relation To CustomerID Into Accounts
*-- So far so good
Select Years
*-- Set Relation To Year Into Accounts
To accomplish the line above you need to set the order of Accounts to Year,
but it's already in CustomerID order for the relation with Customers. You
could set the relation while Accounts is in CustomerID order, assuming both
CustomerID and Year are numeric and VFP won't complain, but you won't get
good data.
-- Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP cindy.winegarden@mvps.org www.cindywinegarden.com
- Next message: Ben Lai: "XMLAdapter class"
- Previous message: HSalim: "FoxPro Stored Procedures"
- In reply to: Marc Kayser: "Re: DataEnvironment"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|