Skip Headers

Oracle® Objects for OLE Developer's Guide
10g Release 1 (10.1)

Part Number B10118-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Master Index
Master Index
Go to Feedback page
Feedback

Accessing Attributes of a Referenceable Instance

Before accessing attributes of a referenceable instance, it should be fetched (pinned) on the client side. OO4O implicitly pins the REF value when attribute values are accessed from the OraRef object. After the pin operation, attributes of the referenceable instance are accessed in the same manner as accessing attributes of a value instance represented by the OraObject.

The following example pins the APERSON REF value (implicitly) and access its name and address attributes. Note that accessing address attribute in turn returns an Address OraObject.

set OO4OSession = CreateObject("OracleInProcServer.XOraSession")

set hrDb = OO4OSession.OpenDatabase("ExampleDb", "scott/tiger", 0)

set Customer = hrDb.CreateDynaset("select * from customers", 0&)

set Person = Customer.Fields("aperson").Value

msgbox Person.Name

set Address = Person.Addr

msgbox Address.City