Retrieving object pointers

chuck hinkle chuckbo at hinkles.us
Tue Nov 4 07:32:03 CST 2003



I tried out some code last night but ran into problems. I don't understand
as much as I thought I did.

I have this code


   SQL = "Select * from Components order by Component_name"
  MyCursor = app.myDB(SQL, kv_client, kv_ReadOnly, kV_ForwardOnly)

  RecordCount = MyCursor.RecordCount
    rc = MyCursor.FirstRecord
    for RHO = 1 to recordCount
        This_component.Component_name =
MyCursor.field("Component_name").getstring
        <snip>
        This_component.component_pointer = Mapcursor.field("recID").getstring


   At this point I get a NilObjectException.
   I'm unclear where recID comes from. Is this a reserved word? It isn't a
property in my table. Should I be trying to use GetrecID on the
Components table instead?
   BTW, I have component_pointer defined as string. Is this correct, since
I have to use getstring, even though the pointer is a vULLong?
   And will this technique still work when I'm joining two tables? How
will I specify whether I want to reference the recID from Table A or
Table B?

chuck



Chuck Hinkle [INTJ]

"Perception is usually more persuasive than reality"



More information about the Valentina mailing list