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: Describing a User-Defined Type

See OraMetaData Schema Definitions.

Dim OraSession As OraSession

Dim OraDatabase As OraDatabase

Dim OraDynaset As OraDynaset

Dim OraMetaData As OraMetaData

Dim OraMDAttribute As OraMDAttribute

Dim attrList As OraMetaData

Dim attr As OraMetaData

'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&)

Set OraMetaData = OraDatabase.Describe("ORAMD_ADDRESS")

NumAttributes = OraMetaData!NumAttributes

NumMethods = OraMetaData!NumMethods

MsgBox "The Address type has " & NumAttributes & " attributes"

MsgBox "Address Object has " & NumMethods & " methods"

'Retrieve the attribute list of this type object

Set attrList = OraMetaData!Attributes.Value

'Display the name and data type of each attribute

For I = 0 To attrList.Count - 1

Set attr = attrList(I).Value

' each attr is actually an OraMetaData

MsgBox "Attribute Name: " & attr!Name

MsgBox "Attribute Type: " & attr!TypeName

Next I


 
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