IPermissionFactory.CreateDatabasePermission(IDatabasePrincipal, IMetadataObject, DatabasePermissionType, IDatabasePrincipal) IPermissionFactory.CreateDatabasePermission(IDatabasePrincipal, IMetadataObject, DatabasePermissionType, IDatabasePrincipal) IPermissionFactory.CreateDatabasePermission(IDatabasePrincipal, IMetadataObject, DatabasePermissionType, IDatabasePrincipal) Method

Definition

Creates a permission object that is given to the specified database principal.

public:
 Microsoft::SqlServer::Management::SqlParser::Metadata::IDatabasePermission ^ CreateDatabasePermission(Microsoft::SqlServer::Management::SqlParser::Metadata::IDatabasePrincipal ^ databasePrincipal, Microsoft::SqlServer::Management::SqlParser::Metadata::IMetadataObject ^ targetObject, Microsoft::SqlServer::Management::SqlParser::Metadata::DatabasePermissionType permissionType, Microsoft::SqlServer::Management::SqlParser::Metadata::IDatabasePrincipal ^ grantor);
public Microsoft.SqlServer.Management.SqlParser.Metadata.IDatabasePermission CreateDatabasePermission (Microsoft.SqlServer.Management.SqlParser.Metadata.IDatabasePrincipal databasePrincipal, Microsoft.SqlServer.Management.SqlParser.Metadata.IMetadataObject targetObject, Microsoft.SqlServer.Management.SqlParser.Metadata.DatabasePermissionType permissionType, Microsoft.SqlServer.Management.SqlParser.Metadata.IDatabasePrincipal grantor);
Public Function CreateDatabasePermission (databasePrincipal As IDatabasePrincipal, targetObject As IMetadataObject, permissionType As DatabasePermissionType, grantor As IDatabasePrincipal) As IDatabasePermission
Parameters
databasePrincipal
IDatabasePrincipal IDatabasePrincipal IDatabasePrincipal

The object that is given the permission.

targetObject
IMetadataObject IMetadataObject IMetadataObject

The object that is the target of the permission.

permissionType
DatabasePermissionType DatabasePermissionType DatabasePermissionType

The value specifying the type of the permission.

grantor
IDatabasePrincipal IDatabasePrincipal IDatabasePrincipal

The object that grants permission to the target object.

Returns

Applies to