共用方式為


ServerRole.AddMembershipToRole 方法

Adds a role to the server role membership.

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

語法

'宣告
Public Sub AddMembershipToRole ( _
    roleName As String _
)
'用途
Dim instance As ServerRole 
Dim roleName As String

instance.AddMembershipToRole(roleName)
public void AddMembershipToRole(
    string roleName
)
public:
void AddMembershipToRole(
    String^ roleName
)
member AddMembershipToRole : 
        roleName:string -> unit
public function AddMembershipToRole(
    roleName : String
)

參數

  • roleName
    型別:System.String
    A String value that specifies the role that is to be added to the server role membership.

請參閱

參考

ServerRole 類別

Microsoft.SqlServer.Management.Smo 命名空間