DatabasePermissionCollection.Add Method

Definition

Overloads

Add(DatabasePermission)

Adds the specified DatabasePermission to the end of the collection.

Add(String)

Creates a new DatabasePermission object using the specified RoleID and a generated unique Name and identifier, adds it to the end of the collection and returns the new DatabasePermission created.

Add(String, String)

Creates a new DatabasePermission object using the specified name and RoleID, adds it to the end of the collection and returns the new DatabasePermission created.

Add(String, String, String)

Creates a new DatabasePermission object using the specified name, identifier and RoleID, adds it to the end of the collection and returns the new DatabasePermission created.

Add(DatabasePermission)

Adds the specified DatabasePermission to the end of the collection.

public int Add (Microsoft.AnalysisServices.DatabasePermission item);
override this.Add : Microsoft.AnalysisServices.DatabasePermission -> int
Public Function Add (item As DatabasePermission) As Integer

Parameters

item
DatabasePermission

The DatabasePermission to be added.

Returns

The zero-based index at which the Microsoft.AnalysisServices.{0} has been added to the collection.

Exceptions

  • The specified item is a null reference (Nothing in Visual Basic).
  • The specified item already esists in the collection.
  • The identifier of the specified DatabasePermission is not valid in the collection.
  • The name of the specified DatabasePermission is not valid in the collection.
  • The compatibility-level of the specified DatabasePermission is not valid in the collection.

Applies to

Add(String)

Creates a new DatabasePermission object using the specified RoleID and a generated unique Name and identifier, adds it to the end of the collection and returns the new DatabasePermission created.

public Microsoft.AnalysisServices.DatabasePermission Add (string roleId);
override this.Add : string -> Microsoft.AnalysisServices.DatabasePermission
Public Function Add (roleId As String) As DatabasePermission

Parameters

roleId
String

The RoleID for the new DatabasePermission object.

Returns

The newly created DatabasePermission object.

Applies to

Add(String, String)

Creates a new DatabasePermission object using the specified name and RoleID, adds it to the end of the collection and returns the new DatabasePermission created.

public Microsoft.AnalysisServices.DatabasePermission Add (string roleId, string name);
override this.Add : string * string -> Microsoft.AnalysisServices.DatabasePermission
Public Function Add (roleId As String, name As String) As DatabasePermission

Parameters

roleId
String

The RoleID for the new DatabasePermission object.

name
String

The Name for the new DatabasePermission object.

Returns

The newly created DatabasePermission object.

Exceptions

The specified name is not valid in the collection.

Remarks

The specified name must be unique within the collection. The identifier for the new DatabasePermission object is generated based on the specified name.

Applies to

Add(String, String, String)

Creates a new DatabasePermission object using the specified name, identifier and RoleID, adds it to the end of the collection and returns the new DatabasePermission created.

public Microsoft.AnalysisServices.DatabasePermission Add (string roleId, string name, string id);
override this.Add : string * string * string -> Microsoft.AnalysisServices.DatabasePermission
Public Function Add (roleId As String, name As String, id As String) As DatabasePermission

Parameters

roleId
String

The RoleID for the new DatabasePermission object.

name
String

The Name for the new DatabasePermission object.

id
String

The identifier for the new DatabasePermission object.

Returns

The newly created DatabasePermission object.

Exceptions

  • The specified name is not valid in the collection.
  • The specified identifier is not valid in the collection.

Remarks

The specified name and identifier must be unique within the collection.

Applies to