See OraMetaData Schema Definitions.
Sub RecursiveDescribe(name$, xMD As OraMetaData)
Dim xMDAttr As OraMDAttribute
For I = 0 To xMD.Count - 1
Set xMDAttr = xMD.Attribute(I)
' If an attribute can be described further, describe it,
' otherwise display its attribute name & value
If (xMDAttr.IsMDObject) Then
RecursiveDescribe xMDAttr.name, xMDAttr.Value
Else
MsgBox name & "->" & xMDAttr.name & " = " & xMDAttr.Value
End If
Next I
End Sub
Sub Main()
'This example displays all the attributes of any schema object given
Dim OraSession As OraSession
Dim OraDatabase As OraDatabase
Dim OraDynaset As OraDynaset
Dim xMD As OraMetaData
Dim x As String
'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&)
' x is any database object, here the EMP table is used as an example
x = "EMP"
Set xMD = OraDatabase.Describe(x)
MsgBox x & " is of the type " & xMD.Type
RecursiveDescribe x, xMD
End Sub