comparing RunRev SQL method with Valentina method

Ruslan Zasukhin sunshine at public.kherson.ua
Sat Jul 5 11:25:17 CDT 2008


On 7/5/08 7:13 PM, "william humphrey" <shoreagent at gmail.com> wrote:

> Not so easy for me. I can do what is described above and in reference and I
> get the result (a long number) but I don't know and cannot find an example
> for the next step which is to use that "second parameter" to get the linked
> data from fields in another table.

You need just think about Tables, Fields, Links, Cursors as objects

Each object can do some methods. Right?

So when you get LinkRef ( that integer number) you have on hands some Link
object. Now you need get info what methods can do a Link.

For this we go to WIKI -> API

http://www.valentina-db.com/dokuwiki/doku.php?id=paradigma:public:en:documen
tation:api:api

And here see 3 pages about Link, Link2 and BinaryLink.

Link Class:

http://www.valentina-db.com/dokuwiki/doku.php?id=paradigma:public:en:documen
tation:api:vlink_class:vlink_class

Here you can see properties and methods of Vlink class.
For example to search linked records we use

VLink.FindLinked()

FindLinked(
    inRecID as Integer,
    inTableA as VTable,
    inTableB as VTable,
    inRecursionDirection as EVRecursionDirection = kFromParentToChild )
as VArraySet


It is very logical if to think about it.

You have table A and B.
You have link between them
You have RecID of some record of table A.
You want find its linked records in table B, so we do

Let recid = 5

  put VLink_FindLinked( linkRef, 5, TableARef, TableBRef )
        into FoundRecsArray


----------------------
The only difference in revolution is that it is not OOP language,
So instead of 

    link.FindLinked( 5, TableARef, TableBRef )

We write

    VLink_FindLinked( linkRef, 5, TableARef, TableBRef )
      

LinkRef is OBJECT which we ask to do action.


Like in real life:

    William.PleaseWriteLetter()


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