V4RB2 vLink
Ruslan Zasukhin
sunshine at public.kherson.ua
Thu Dec 30 12:05:23 CST 2004
On 12/30/04 10:17 AM, "erne" <ernestogiannotta at tiscalinet.it> wrote:
>>> after all we are required to know the Index order of linked tables if
>>> we must link records by:
>>> vLink.LinkRecords( inRecIDs() as Integer )
>>
>> Agree. Index of table is strict thing.
>> It correspond to the order of creation.
>>
>>> anyway, to specify the 2nd table seems redundant as we have:
>>> vLink.DeleteLinkedRecords( inRecID as Integer, inTableA as VTable )
>>> vLink.DeleteAllLinkedRecords( inTableA as VTable )
>>>
>>> so it should be enough:
>>> vLink.FindLinked( inRecID as Integer, inTableA as [VTable or Integer] )
>>> as VSet
>>
>> I see your point...and
>>
>>> unless vLink will be able to link more than 2 tables in the future
>>
>> Exactly! Bingo! :-)
>>
>>> in which case the LinkRecords, DeleteLinkedRecords and
>>> DeleteAllLinkedRecords methods must be updated
>>
>> NO. because when link will have 3 branches, I still can say
>>
>> vLink.DeleteAllLinkedRecords( inTableA as VTable )
>>
>> And this means break links to ALL linked tables of TableA.
>>
>
> still
>
> vLink.LinkRecords( inRecIDs() as Integer )
>
> remains not consistent... it does not give way to specify link direction
and
> should be
>
> vLink.LinkRecords( inRecIDs() as Integer, inTableA as VTable, inTableB as
> VTable )
>
> just like in the vLink.FindLinked syntax
No no no.
When you create link you specify order of tables:
db.CreateBinaryLink( ... T1, T2 ...)
So when you want link 2 records of these tables you do
link.LinkRecords( Array( 3, 5) )
And you and Valentina know that
3 -- this is RecID of T1
5 -- this is RecID of T2.
Direction is not important here. Absolutely.
--
Best regards,
Ruslan Zasukhin [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com
To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------
More information about the Valentina-beta
mailing list