Oracle® Objects for OLE Developer's Guide 10g Release 1 (10.1) Part Number B10118-01 |
|
Applies To
Description
Describes a schema object. This method returns an instance of the OraMetaData interface.
Arguments
[in] SchemaObjectName |
A String representing the name of the schema object to be described. |
OraMetaDataObj = OraDatabase.Describe("SchemaObjectName")
Remarks
The following schema object types are allowed to be described: Tables, Views, Procedures, Functions, Packages, Sequences, Collections (VARRAYS or Nested Tables), and Types. Attempting to describe any other schema object (for example, a column) or an invalid schema object name will raise an error. Schema objects not listed here should be navigated to rather than described directly.
This method takes the name of a schema object, such as emp, and returns a COM Automation object (OraMetaData). OraMetaData provides methods for dynamically navigating and accessing all the attributes (OraMDAttribute collection) of a schema object described.
Example
The following VB script illustrates a simple usage of Describe to retrieve and display several attributes of the emp table.
Set emp = OraDatabase.Describe("emp")
'Display the name of the Tablespace
MsgBox emp!tablespace
'Display name and datatype of each column in the emp table.
Set empColumns = emp!ColumnList
Set ColumnList = empColumns.Value
for i = 0 to ColumnList.Count - 1
Set Column = ColumnList(i).Value
MsgBox "Column: " & Column!Name & " Datatype: " & Column!Datatype
Next i
See Examples for more code samples.