Export (0) Print
Expand All

Defining a Class View

SQL Server 2000

Defining a Class View

You can direct the repository engine to create a class-oriented view for a class definition object. The generated view includes all the properties (one column for each property) of every interface that is implemented by the class, including those that are implied and inherited. It also includes all many-to-one relationships on those interfaces, representing each one as a foreign key.

When defining a class view, you should verify that the combination of interfaces does not produce a duplicate column name (for example, a Name property on two separate interfaces). To ensure that column names are unique, you can create a view column name. For more information, see IViewPropertyDef Interface, Defining View Columns, and Naming Conventions for Generated Views.

To create a class view, use IViewClassDef in a way that is similar to the following example:

Dim oTypeLib as ReposTypeLib
Dim oTable as ClassDef
Dim oViewTable as IViewClassDef
set oTable = oTypeLib.CreateClassDef(objid_null, oTypeLib_name, oTypeLib_clsID)
set oViewTable=oTable
// Generate a workspace-scoped view by specifying bit=4
oViewTable.flags=4

For more information about properties and flags that you can specify, see Defining Views in an Information Model and IViewClassDef Interface.

See Also

Defining a Junction Table View

Defining an Interface View

RTblClassDefs SQL Tables

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft