[V4RB] API way, how to set field value of found record.

Ruslan Zasukhin sunshine at public.kherson.ua
Sun Dec 11 19:48:20 CST 2005


On 12/11/05 7:29 PM, "jda" <jda at his.com> wrote:

> I was just about to write to about that! The API way looks easier

But it is not good for remote server work

> (and more intuitive). For example, I can to this to see if the field
> I want exists:
 
> if myDatabase.myReferenceText.refPtr.ValueExists(refPtr) and
> myDatabase.myReferenceText.labelPtr.ValueExists(index + 1) then...

 
> But how do I turn that field into something I can get/set via API
> .getString/.setString? What is the syntax for
> 
> ...the text field where refPtr = 1 AND labelPtr = 3...
> 
> so I can set it?

You need obtain RecID

So you need change your code as:

    set1 = myDatabase.myReferenceText.refPtr.FindValue(refPtr)
    set2 = myDatabase.myReferenceText.labelPtr.FindValue( index+1, set1 )

    // now yoy have found set2 records which refers to your book AND
    // to required label.
    
    // I assume that set2 contains ONLY one record.
    // so it can be good idea to use FindValueAsArraySet()
    // or even better FindSingleValue()

    recid = myReferenceText.labelPtr.FindSingleValue( index+1, set1 )


Now you know record of table B which you need. so

    tblB.Recid = recid

    tblB.fldText.SetString .........
        


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