pointers

Ruslan Zasukhin sunshine at public.kherson.ua
Thu Oct 23 10:12:58 CDT 2003


on 10/23/03 8:06, chuck hinkle at chuckbo at hinkles.us wrote:

Hi Chuck,

> My next question is about getrecID.
> 
> Help me, please, make sure I understand it correctly.

> I set the properties of the fields of a base object and the fields of a
> "child" base object. Until I do an addRecord,for the parent, is its getrecID
> null?

You mean you use ObjectPtr field in the CHILD BaseObject ?

Yes, until you assign some value it points to NULL.
I.e. Record DO NOT have parent.

You can even do searches

    WHERE ptr = 0


> Once I do an addRecord for the parent, does getrecID point to the record
> that was just added until I do another addRecord?

No. it is not automatic.

You need

    parent fill fields
    parent.AddRecord

    child fill fields and...
    child.ptr = parent.GetRecID()
    child.AddRecord.


In fact you can assign/change PARENT record at any time.
This can be 5 days later.

    ptr is just INTEGER field. It store some value
            -- RecID of some record of parent table


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