Oracle Objects for OLE
Release 9.2

Part Number A95895-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents

Master Index

Feedback

Example: Creating an OraRef

The following example illustrates the use of the CreateOraObject method to insert referenceable objects. Before running the sample code, make sure that you have the necessary datatypes and tables in the database. See Schema Description used in examples of OraObject/OraRef.

In this example a new "PERSON" is inserted as a referenceable object in the server.

Dim OraSession as OraSession

Dim OraDatabase as OraDatabase

Dim Person as OraRef

'Create the OraSession Object.

Set OraSession = CreateObject("OracleInProcServer.XOraSession")

'Create the OraDatabase Object by opening a connection to Oracle.

Set OraDatabase = OraSession.OpenDatabase("ExampleDb",

"scott/tiger", 0&)

'CreteOraObject creates a new referenceable

'object in the PERSON_TAB object table and returns associated OraRef

set Person = OraDatabase.CreateOraObject("PERSON","PERSON_TAB")

'modify the attributes of Person

Person.Name = "Eric"

Person.Age = 35

'Update method inserts modified referenceable object in the PERSON_TAB.

Person.Update


 
Oracle
Copyright © 1994, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents

Master Index

Feedback