Oracle Objects for OLE
Release 9.0.1

Part Number A90173-01

Home

Book List

Contents

Master Index

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


 
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.

Home

Book List

Contents