ReportingService2010.TestConnectForDataSourceDefinition(DataSourceDefinition, String, String, String) ReportingService2010.TestConnectForDataSourceDefinition(DataSourceDefinition, String, String, String) Method


Tests the connection for a data source. This method supports the direct testing of the data source.

 bool TestConnectForDataSourceDefinition(ReportService2010::DataSourceDefinition ^ DataSourceDefinition, System::String ^ UserName, System::String ^ Password, [Runtime::InteropServices::Out] System::String ^ % ConnectError);
[System.Web.Services.Protocols.SoapDocumentMethod("", ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped, RequestNamespace="", ResponseNamespace="", Use=System.Web.Services.Description.SoapBindingUse.Literal)]
[System.Web.Services.Protocols.SoapHeader("ServerInfoHeaderValue", Direction=System.Web.Services.Protocols.SoapHeaderDirection.Out)]
public bool TestConnectForDataSourceDefinition (ReportService2010.DataSourceDefinition DataSourceDefinition, string UserName, string Password, out string ConnectError);


DataSourceDefinition DataSourceDefinition

The data source definition that defines the connection to the data source.

String String

The user name to use to test the connection.UserName is used with data sources that prompt for credentials.

String String

The password to use to test the connection.Password is used with data sources that prompt for credentials.


A detailed error message. The message is returned when the connection fails. The data source provider provides the detailed message.


A Boolean the indicates whether the connection completed successfully.

A string that contains a detailed error message. The string is returned as the out parameter, ConnectError.


The table below shows header and permissions information on this operation.

SOAP Header Usage (In) TrustedUserHeaderValue

(Out) ServerInfoHeaderValue
Native Mode Required Permissions ExecuteReportDefinition (System)
SharePoint Mode Required Permissions Needs the system property EnableLoadReportDefinition set to true

Permission to execute the report definition is required.

Applies to