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

Modifying Attributes of a Referenceable Instance

Because a referenceable instance is stored in a row of an object table, modifying attributes of referenceable instance requires an object lock, which means rows corresponding to the object instance in a object table should be locked. This can be done by calling the Edit (OraRef) method of the OraRef object. An object lock is release by the Update (OraRef) method. The following example modifies the age attribute of Person object.

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

Person.Edit

Person.Age = 45

Person.Update