From: Stephen Quinn on
}aul

>> The field doesn't have to be in the index expression (of the chld)
> of the master, you mean... ?
No - the child

Matter of fact it doesn't have to be in the expression of any index for the
relationship to work.
The only requirementa are that it's in both DBFs and the child has an index

CYA
Steve


From: Paul D B on
Stephen Quinn wrote:
> }aul
>
>>> The field doesn't have to be in the index expression (of the chld)
>> of the master, you mean... ?
> No - the child
>
> Matter of fact it doesn't have to be in the expression of any index
> for the relationship to work.
> The only requirementa are that it's in both DBFs and the child has an
> index
> CYA
> Steve

Are you sure Steve? I thought that the underlying mecanism was a seek. So
the eacht time the master moves a record - a seek is performed in the child
.. I don't see how you can seek on a common field when it is not incuded in
the index expression of the child.

See VO help for Setrelation::
As always, the child work area should have a controlling index that matches
the expression."


--
Paul


From: Johan Nel on
Paul,

SetRelation is not going to work for what you intend to do, except if you
have a Str(InvCustNr, 6) + Descend(DToS(InvDate)) on the Invoice table.

Then from the master:

oCust:SetSelectiveRelation(oInv,;
{|| Str(_FIELD->CustNr, 6, 0)},;
"Str(CustNr, 6, 0)")

HTH,

Johan Nel
Pretoria, South Africa.

Paul D B wrote:
> Stephen Quinn wrote:
>> }aul
>>
>>>> The field doesn't have to be in the index expression (of the chld)
>>> of the master, you mean... ?
>> No - the child
>>
>> Matter of fact it doesn't have to be in the expression of any index
>> for the relationship to work.
>> The only requirementa are that it's in both DBFs and the child has an
>> index
>> CYA
>> Steve
>
> Are you sure Steve? I thought that the underlying mecanism was a seek. So
> the eacht time the master moves a record - a seek is performed in the child
> . I don't see how you can seek on a common field when it is not incuded in
> the index expression of the child.
>
> See VO help for Setrelation::
> As always, the child work area should have a controlling index that matches
> the expression."
>
>
From: Geoff Schaller on
You misunderstand.

The index is in the child because this is where the seek occurs. You are
confirming this.

But the fields and the name does not have to be identical and the parent
does not have to be indexed or even in the same order as the child. The
only requirements are that the data type of the linked parent field and
value has to match the index expression in the child. The child seek is
triggered by a record movement in the parent.

Don't forget you can relate on more than one field.

Geoff



"Paul D B" <polleke(a)NOMORESPAMhnt.be> wrote in message
news:4b055f3e$0$2853$ba620e4c(a)news.skynet.be:

> Stephen Quinn wrote:
>
> > }aul
> >
>
> >>> The field doesn't have to be in the index expression (of the chld)
>
> >> of the master, you mean... ?
>
> > No - the child
> >
> > Matter of fact it doesn't have to be in the expression of any index
> > for the relationship to work.
> > The only requirementa are that it's in both DBFs and the child has an
> > index
> > CYA
> > Steve
>
>
> Are you sure Steve? I thought that the underlying mecanism was a seek. So
> the eacht time the master moves a record - a seek is performed in the child
> . I don't see how you can seek on a common field when it is not incuded in
> the index expression of the child.
>
> See VO help for Setrelation::
> As always, the child work area should have a controlling index that matches
> the expression."
>
>
> --
> Paul

From: Stephen Quinn on
Paul

Yeah - I'm wrong again, no idea what I'm typing these days<g>
- glad I've given programming away, seems like it's time for me to
retire from the ng.

Sorry for the misinformation.

CYA
Steve


First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4
Prev: Help with C# Source
Next: VO2Ado Parameterized Query