次の方法で共有


SQLObjectList Object

この機能は、将来のバージョンの Microsoft SQL Server では削除される予定です。新規の開発作業ではこの機能を使用しないようにし、現在この機能を使用しているアプリケーションは修正することを検討してください。

The SQLObjectList object is a fixed-membership container for objects enumerated by an object-listing method.

現在のオブジェクトを表す SQL-DMO オブジェクト モデル

Methods

Item Method

Refresh Method

解説

SQL Distributed Management Objects (SQL-DMO) implements a number of container objects expressing, through their relationships, a logical structure for creating, viewing, and managing Microsoft SQL Server components. The SQL-DMO collection is one such container. The SQLObjectList object is another.

Collections, exposing the Add and Remove methods, implement SQL Server component management by mapping collection membership changes to component creation or deletion. The SQLObjectList object does not expose membership-modifying methods. Instead, applications create object lists to extract a subset of SQL Server components for viewing or management.

Unlike a collection, SQLObjectList does not guarantee that all objects contained have the same type. Some implemented lists, such as the list returned by the ListObjects method of the Database object, return a user-specified selection of objects. Use the TypeOf property of an object to check SQL-DMO object type when using lists of multiple kinds of objects.

In general, use the SQLObjectList object to get SQL-DMO objects that reference SQL Server components if an object-listing method is an appropriate mechanism. If the SQLObjectList object is not an appropriate container, such as when application logic is built to remove a SQL Server component, use the component referencing collection instead. The following Microsoft Visual Basic example illustrates removing the column binding for all rules in a database:

Dim oRule As SQLDMO.Rule
Dim oColumn As SQLDMO.Column
Dim oColList As SQLDMO.SQLObjectList
Dim oTable As SQLDMO.Table

For Each oRule In oCurDB.Rules
    Set oColList = oRule.ListBoundColumns
    For Each oColumn In oRule.ListBoundColumns
        Set oTable = oColumn.Parent
        oRule.UnbindFromColumn oTable.Name, oColumn.Name
    Next oColumn
Next oRule
ms140638.note(ja-jp,SQL.90).gifメモ :
For C/C++, Sqldmo.h defines a number of list object types. If an object listing method returns a SQLObjectList object whose members are identical, such as the ListPermissions method, the member function defines its return argument using the list object type

参照

関連項目

Defined List Types
ListBoundColumns Method
ListBoundDatatypes Method
ListColumns Method
ListDatabasePermissions Method
ListIndexedColumns Method
ListKeys Method
ListObjects Method
ListOwnedObjects Method
ListObjectPermissions Method
ListPermissions Method
ListPrivilegeColumns Method
ListReplicatedColumns Method
ListStartupProcedures Method
ListUserPermissions Method

ヘルプおよび情報

SQL Server 2005 の参考資料の入手