次の方法で共有


clsRoleCommand

ms135628.note(ja-jp,SQL.90).gifメモ :
  この機能は、Microsoft SQL Server の次のバージョンで削除されます。新規の開発作業ではこの機能を使用しないようにし、現在この機能を使用しているアプリケーションはできるだけ早く修正してください。

An object of ClassType clsRoleCommand provides a specific implementation of the Command interface. These objects provide collections and properties through the Command interface. There are no methods associated with an object of ClassType clsRoleCommand.

解説

An object of ClassType clsRoleCommand encapsulates a user-defined command that is automatically executed on the Microsoft® SQL Server™ 2000 Analysis Services client computer when a cube is accessed by members of the specified role. You add a command to a role by adding it to the role's Commands collection. Such commands include calculated members, named sets, library references, and others.

For example, you may want to grant access to a calculated member called SalesBonusto members of the Manager role but not to members of the SalesPerson role. The command that builds the SalesBonus calculated member is automatically executed for members of the Manager role when they access a cube that contains that role command.

使用例

Use the following code to create an object of ClassType clsRoleCommand:

'Assume an object (dsoDB) of ClassType clsDatabase exists
Dim dsoRole As DSO.Role   'Role
Dim dsoCmd As DSO.Command   'Command

Set dsoRole = dsoDB.Roles(1)
Set dsoCmd = dsoRole.Commands.AddNew("RoleCmd1")

参照

関連項目

Collections, clsRoleCommand
Command Interface
Properties, clsRoleCommand

その他の技術情報

コマンド

ヘルプおよび情報

SQL Server 2005 の参考資料の入手