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

 

Applies To: SQL Server 2016 Preview

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

Namespace:   ReportService2010
Assembly:  ReportService2010 (in ReportService2010.dll)

Syntax

[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/TestConnectForDataSourceDefinition", 
    RequestNamespace = "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", 
    ResponseNamespace = "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
[SoapHeaderAttribute("TrustedUserHeaderValue")]
[SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)]
public bool TestConnectForDataSourceDefinition(
    DataSourceDefinition DataSourceDefinition,
    string UserName,
    string Password,
    out string ConnectError
)
public:
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/TestConnectForDataSourceDefinition", 
    RequestNamespace = "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", 
    ResponseNamespace = "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", 
    Use = SoapBindingUse::Literal, ParameterStyle = SoapParameterStyle::Wrapped)]
[SoapHeaderAttribute("TrustedUserHeaderValue")]
[SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection::Out)]
bool TestConnectForDataSourceDefinition(
    DataSourceDefinition^ DataSourceDefinition,
    String^ UserName,
    String^ Password,
    [OutAttribute] String^% ConnectError
)
[<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/TestConnectForDataSourceDefinition",
    RequestNamespace = "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
    ResponseNamespace = "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)>]
[<SoapHeaderAttribute("TrustedUserHeaderValue")>]
[<SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)>]
member TestConnectForDataSourceDefinition : 
        DataSourceDefinition:DataSourceDefinition *
        UserName:string *
        Password:string *
        ConnectError:string byref -> bool
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/TestConnectForDataSourceDefinition",
    RequestNamespace := "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
    ResponseNamespace := "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
    Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)>
<SoapHeaderAttribute("TrustedUserHeaderValue")>
<SoapHeaderAttribute("ServerInfoHeaderValue", Direction := SoapHeaderDirection.Out)>
Public Function TestConnectForDataSourceDefinition (
    DataSourceDefinition As DataSourceDefinition,
    UserName As String,
    Password As String,
    <OutAttribute> ByRef ConnectError As String
) As Boolean

Parameters

  • UserName
    Type: System.String

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

  • Password
    Type: System.String

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

  • ConnectError
    Type: System.String

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

Return Value

Type: System.Boolean

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.

Remarks

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.

See Also

ReportingService2010 Class
ReportService2010 Namespace

Return to top