DataSourceCollection.Add DataSourceCollection.Add DataSourceCollection.Add Method

Definition

Overloads

Add() Add() Add()

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

Add(DataSource) Add(DataSource) Add(DataSource)

Adds the specified DataSource to the end of the collection.

Add(String) Add(String) Add(String)

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

Add(String, String) Add(String, String) Add(String, String)

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

Add() Add() Add()

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

public Microsoft.AnalysisServices.RelationalDataSource Add ();
override this.Add : unit -> Microsoft.AnalysisServices.RelationalDataSource
Public Function Add () As RelationalDataSource

Returns

Add(DataSource) Add(DataSource) Add(DataSource)

Adds the specified DataSource to the end of the collection.

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

Parameters

item
DataSource DataSource DataSource

The DataSource to be added.

Returns

The zero-based index at which the DataSource 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 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.

Add(String) Add(String) Add(String)

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

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

Parameters

name
String String String

The Name for the new DataSource object.

Returns

Exceptions

Remarks

The identifier for the new DataSource object is generated based on the specified name.

Add(String, String) Add(String, String) Add(String, String)

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

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

Parameters

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 name is not valid in the collection.
  • The specified identifier is not valid in the collection.

Applies to