[V4RB] binarylink concept question

Peter Salomon peter.salomon at gmx.net
Sun Aug 21 23:58:59 CDT 2005


> Left right? But how you can remember (know) which table is on left  
> or right
> for THIS link ?
>
> This is why we ask you EXPLICITLY show tables.
>     - Never mind which one is left right.
>     - you solve some task. You think:
>         I have persones, I want find phones...
>         so:
>
>         res = FindAllLinked( person, phones )
>
> No way to make a mistake. :-)

:-) no?

ok. what if i think:

"I want phones from person!"
(like one is used to think from sql)

You see, also with the acual way you differ between the tables by  
definiton which is the 'i_have_table' and which the  
'i_wanna_get_table' .

And the definition is: 'i_have_table' is on the left side, 'i- 
wanna_get_table' is on the right side.

And if í have named my links  in a useful way like "LinkTblA_TblB" i  
know very well where my tables are and have no need to remember.
So - just by defining the sides, link ca do its job.

Moreover i need to remember the poistions of tables also for defining  
the links!

LPersonPhones = new VBinaryLink("LinkPerson_Phones", TblPerson,  
TblPhones, EVLinkType.kOne,EVLinkType.kMany)

Recs(0) = 1 <------- TblPerson
Recs(1) = 1 <------- TblPhones

LPersonPhones.LinkRecords(Recs)
and now again:  res = LPersonPhones.FindAllLinked( TblPerson,  
TblPhones )

i was just wondering ruslan, if LPersonPhones.FindAllLinked( ) would  
be enough?
because it seems to me that i tell link its tables twice which is -  
in my opinion - one time too much.

hey - links work well the way they are, its a discusson about  
cosmetic questions...
there might also be other reasons, i did not think about other  
linktypes yet.

best regards, peter :-)




More information about the Valentina mailing list