Some comments

Ruslan Zasukhin sunshine at public.kherson.ua
Mon Aug 28 18:09:54 CDT 2006


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 found too many errors in the Embedded Server product that for
> now I am using pure SQL and instead of links (Foreign, Binary or
> Object) I am creating additional integer fields in tables to
> establish links that I can control and which work without having to
> worry about whether the kernel works.

Important point.

* !!! While you develop SERVER product -- AVOID API way. You have read
article about ways in WIKI ?

You must use SQL way: SQ: commands, Joins, Cursors. Because this way support
record locks.

* Second point. BinaryLinks, ObjectPtr-links as well as Foreign Key do work
in SQL also !!!!!!!!!!!

So you still can use them without problems in your db structure. And even
this is RECOMMENDED todo.

But again, avoid to use Vtable, Vlink, Vset classes for SERVER solution.



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