Binary Links

Ruslan Zasukhin sunshine at public.kherson.ua
Sun Apr 30 17:09:08 CDT 2006


On 4/30/06 5:01 PM, "Joakim Schramm" <joakim at astrocalc.com> wrote:

>> 
>>> Just a small question before dig into set up my binary links. Can I
>>> setup 2 or more links from the one side so I kind of get it like a
>>> WERE A=This AND B=That ? Well I might get it more as I get
>> along the 
>>> road, but was just thinking of this one in setting
>> conitions on 2 or more tables...
>> 
>> You ask if you can have several binary links between 2 tables?
>> YES. 
> 
> SAME 2 tables? 

yes

> It will then act as Field1Val AND Field2Val critera, or OR or
> etc. depending on function used to return RecSet/Item?

Not exactly

Let you have on left table T1 some record with RecID = 555

THIS record by link1 is linked to such records of right table T2
        { 7 9 11 13 15 }

And THIS record also is linked by link2 to record of right table T2
        { 9 13 17 21 }

You have function 

    set1 = link1.FindLinked( 555, T1, T2 )

    set2 = link2.FindLinked( 555, T1, T2 )

Now you have 2 sets.

So you want "WERE A=This AND B=That" then you simple do intresection

    set3 = set1.intersect( set2 )  // => { 9, 13 }

Works ?


-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list