BIMonitoringServiceApplicationProxy.DeleteDataSource method

Deletes a data source from a SharePoint document library.

Namespace:  Microsoft.PerformancePoint.Scorecards
Assembly:  Microsoft.PerformancePoint.Scorecards.ServerCommon (in Microsoft.PerformancePoint.Scorecards.ServerCommon.dll)

Syntax

'Declaration
Public Sub DeleteDataSource ( _
    location As RepositoryLocation _
)
'Usage
Dim instance As BIMonitoringServiceApplicationProxy
Dim location As RepositoryLocation

instance.DeleteDataSource(location)
public void DeleteDataSource(
    RepositoryLocation location
)

Parameters

Implements

IBIMonitoringServiceApplicationProxy.DeleteDataSource(RepositoryLocation)

Remarks

PerformancePoint Services uses SharePoint document libraries as the repository for data sources.

Examples

The following code example shows how to delete a data source from the repository, based on the server-relative path to the object.

Before you can compile this code example, you must do the following:

  • Configure your development environment and create a C# class library project in Visual Studio. For information about configuring a development environment, see Set up a general development environment for SharePoint 2013.

  • Add the Microsoft.PerformancePoint.Scorecards.Client and Microsoft.PerformancePoint.Scorecards.ServerCommon DLLs as references to your project. For more information about PerformancePoint Services DLLs, see PerformancePoint Services DLLs Used in Development Scenarios.

  • Add the following using directive to your class: using Microsoft.PerformancePoint.Scorecards;.

  • Create a method that defines a string variable named "relativePath" to store the server-relative path to the object. The following example path sets the object identifier to "5": /BI Center/Data Connections for PerformancePoint/5_.000.

  • Paste the following code example into the new method.

// Create a RepositoryLocation object. The constructor takes the server-relative
// path to the data source.
RepositoryLocation dataSourceLocation = new RepositoryLocation(relativePath);

// This example assumes the code is running in a Web Part on a front-end Web server.
// If this code is running within a service application, then you can call the
// SPDataStore.GlobalStore.DeleteDataSource method directly. 
BIMonitoringServiceApplicationProxy.Default.DeleteDataSource(dataSourceLocation);

See also

Reference

BIMonitoringServiceApplicationProxy class

BIMonitoringServiceApplicationProxy members

Microsoft.PerformancePoint.Scorecards namespace