Share via


DatabasePermissionSet.Add Method (DatabasePermissionSet, DatabasePermission)

Returns a database permission set after adding a new a database permission to the specified permission set.

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

Syntax

'Declaration
Public Shared Function Add ( _
    permissionLeft As DatabasePermissionSet, _
    permissionRight As DatabasePermission _
) As DatabasePermissionSet
'Usage
Dim permissionLeft As DatabasePermissionSet
Dim permissionRight As DatabasePermission
Dim returnValue As DatabasePermissionSet

returnValue = DatabasePermissionSet.Add(permissionLeft, _
    permissionRight)
public static DatabasePermissionSet Add(
    DatabasePermissionSet permissionLeft,
    DatabasePermission permissionRight
)
public:
static DatabasePermissionSet^ Add(
    DatabasePermissionSet^ permissionLeft, 
    DatabasePermission^ permissionRight
)
static member Add : 
        permissionLeft:DatabasePermissionSet * 
        permissionRight:DatabasePermission -> DatabasePermissionSet 
public static function Add(
    permissionLeft : DatabasePermissionSet, 
    permissionRight : DatabasePermission
) : DatabasePermissionSet

Parameters

Return Value

Type: Microsoft.SqlServer.Management.Smo.DatabasePermissionSet
A DatabasePermissionSet object that includes the new permission.