共用方式為


SPDatabase.GrantAccess method (SecurityIdentifier, String)

授與指定之的使用者資料庫的存取權,並將使用者新增至指定的角色。

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'宣告
Protected Friend Sub GrantAccess ( _
    sid As SecurityIdentifier, _
    role As String _
)
'用途
Dim sid As SecurityIdentifier
Dim role As String

Me.GrantAccess(sid, role)
protected internal void GrantAccess(
    SecurityIdentifier sid,
    string role
)

參數

  • role
    Type: System.String

    要新增使用者Microsoft SQL Server角色。

請參閱

參照

SPDatabase class

SPDatabase members

GrantAccess overload

Microsoft.SharePoint.Administration namespace