DataSourceCollection.Insert DataSourceCollection.Insert DataSourceCollection.Insert Method

Definition

Overloads

Insert(Int32, String, String) Insert(Int32, String, String) Insert(Int32, String, String)

Creates a new DataSource object using the specified name and identifier, inserts it to the collection at the specified index and returns the new DataSource created.

Insert(Int32, String) Insert(Int32, String) Insert(Int32, String)

Creates a new DataSource object using the specified name, inserts it to the collection at the specified index and returns the new DataSource created.

Insert(Int32) Insert(Int32) Insert(Int32)

Creates a new DataSource object using a generated unique Name and identifier, inserts it to the collection at the specified index and returns the new DataSource created.

Insert(Int32, DataSource) Insert(Int32, DataSource) Insert(Int32, DataSource)

Inserts the specified DataSource to the collection at the specified index.

Insert(Int32, String, String) Insert(Int32, String, String) Insert(Int32, String, String)

Creates a new DataSource object using the specified name and identifier, inserts it to the collection at the specified index and returns the new DataSource created.

public Microsoft.AnalysisServices.RelationalDataSource Insert (int index, string name, string id);
override this.Insert : int * string * string -> Microsoft.AnalysisServices.RelationalDataSource
Public Function Insert (index As Integer, name As String, id As String) As RelationalDataSource

Parameters

index
Int32 Int32 Int32

The zero-based index at which the DataSource is inserted.

name
String String String

The Name for the new DataSource object.

id
String String String

The identifier for the new DataSource object.

Returns

Exceptions

The specified index is not a valid value (less than zero or bigger then the total number of elements).

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

Insert(Int32, String) Insert(Int32, String) Insert(Int32, String)

Creates a new DataSource object using the specified name, inserts it to the collection at the specified index and returns the new DataSource created.

public Microsoft.AnalysisServices.RelationalDataSource Insert (int index, string name);
override this.Insert : int * string -> Microsoft.AnalysisServices.RelationalDataSource
Public Function Insert (index As Integer, name As String) As RelationalDataSource

Parameters

index
Int32 Int32 Int32

The zero-based index at which the DataSource is inserted.

name
String String String

The Name for the new DataSource object. It must be unique within the collection.

Returns

Exceptions

The specified index is not a valid value (less than zero or bigger then the total number of elements).

Remarks

The identifier for the DataSource is generated based on the specified Name.

Insert(Int32) Insert(Int32) Insert(Int32)

Creates a new DataSource object using a generated unique Name and identifier, inserts it to the collection at the specified index and returns the new DataSource created.

public Microsoft.AnalysisServices.RelationalDataSource Insert (int index);
override this.Insert : int -> Microsoft.AnalysisServices.RelationalDataSource
Public Function Insert (index As Integer) As RelationalDataSource

Parameters

index
Int32 Int32 Int32

The zero-based index at which the DataSource is inserted.

Returns

Exceptions

The specified index is not a valid value (less than zero or bigger then the total number of elements).

Insert(Int32, DataSource) Insert(Int32, DataSource) Insert(Int32, DataSource)

Inserts the specified DataSource to the collection at the specified index.

public void Insert (int index, Microsoft.AnalysisServices.DataSource item);
override this.Insert : int * Microsoft.AnalysisServices.DataSource -> unit
Public Sub Insert (index As Integer, item As DataSource)

Parameters

index
Int32 Int32 Int32

The zero-based index at which the DataSource is inserted.

item
DataSource DataSource DataSource

The DataSource to be inserted.

Exceptions

The specified index is not a valid value (less than zero or bigger then the total number of elements).

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

Applies to