共用方式為


DatabaseRole.EnumRoles 方法

Returns a list of the roles that the referenced database role is a member of.

命名空間:  Microsoft.SqlServer.Management.Smo
組件:  Microsoft.SqlServer.Smo (在 Microsoft.SqlServer.Smo.dll 中)

語法

'宣告
Public Function EnumRoles As StringCollection
'用途
Dim instance As DatabaseRole 
Dim returnValue As StringCollection 

returnValue = instance.EnumRoles()
public StringCollection EnumRoles()
public:
StringCollection^ EnumRoles()
member EnumRoles : unit -> StringCollection
public function EnumRoles() : StringCollection

傳回值

型別:System.Collections.Specialized.StringCollection
A StringCollection system object value that contains the roles that the referenced database role is a member of.

範例

指令碼

請參閱

參考

DatabaseRole 類別

Microsoft.SqlServer.Management.Smo 命名空間

其他資源

管理使用者、角色和登入

資料庫層級角色

CREATE ROLE (Transact-SQL)