Some comments

Ruslan Zasukhin sunshine at public.kherson.ua
Mon Aug 28 18:15:14 CDT 2006


On 8/28/06 6:09 PM, "Ruslan Zasukhin" <sunshine at public.kherson.ua> wrote:

> On 8/28/06 5:47 PM, "Ray Veenema" <rayveenema at mac.com> wrote:
> 
>> I have two tables: A and B with an 1 to m relationship. One record in
>> A can have many records in B. The recID's I have are:
>> 
>> A  B
>> 1 - 1
>> 1 - 2
>> 1 - 3
>> 
>> I want to delete record 2 from table B.
>> 
>> So I do:
>> 
>> B.recID = 2
>> B.deleterecord()
> 
> Up to now ALL RIGHT.
> 
>> vlink.deletelinkedrecords(B, 2)
> 
> And here STOP. 
> 
> You want remove pair (1,2) from Link itself?
> I'd write this as:
> 
>     // At first we break link between objects
>     vLink.Unlink( 1, 2 )
> 
>     // now delete one of objects
>     B.recid = 2
>     B.DeleteRecord()

I have to think more. Valentina always take care about correctness of links.
So if you delete record 2 in B, then Valentina self make sure that all links
around B also are cleanup.

In other words, you can do simply:

    B.recID = 2
    B.deleterecord()
 

-- 
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