by "Stephen Quinn" <stevejqNO@[EMAIL PROTECTED]
>
Feb 26, 2008 at 01:48 AM
Otto
> Stange, because, the sample show a codeblock. I also chanded to you
solution. But do the same.
Doesn't mean the docs are correct<bg>, but I don't have the docs close to
hand (buried in a box in the backroom) and nor
to I have Clipper available to me here at the moment so I can look up the
.ch file.
> use invoice new
> use customer new
> set relation to customer->cid into invoice
>
> sele invoice
> set order to tag cid
> set scope to { || customer->cid }
>
If that's the working code then you need to read up about relationships a
bit more.
Once you set the relationship don't need the SCOPE at all (the RDD does it
internally for you), you just need to make
sure the child is using an index.
Try
> use invoice new
> set order to tag cid
> use customer new
> set relation to customer->cid into invoice
Whatever the CID is for the customer will limit the records visible in
Invoice to those that belong to that customer.
You'd use the SCOPE when you DON'T set a relation.
Eg
> use customer new
> use invoice new
> set order to tag cid
> set scope to { || customer->cid }
--
CYA
Steve