Oracle Objects for OLE
Release 8.1.7

Part Number A85257-01

Library

Product

Contents

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


 
Oracle
Copyright copy; 1996-2000, Oracle Corporation.

All Rights Reserved.

Library

Product

Contents