Oracle Objects for OLE Release 9.2 Part Number A95895-01 |
|
The following example inserts the new "PERSON" referenceable object in the server. 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.
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
|
Copyright © 1994, 2002 Oracle Corporation. All Rights Reserved. |
|