다음을 통해 공유


ReportingService2010.TestConnectForDataSourceDefinition 메서드

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

네임스페이스:  ReportService2010
어셈블리:  ReportService2010(ReportService2010.dll)

구문

‘선언
<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
‘사용 방법
Dim instance As ReportingService2010 
Dim DataSourceDefinition As DataSourceDefinition 
Dim UserName As String 
Dim Password As String 
Dim ConnectError As String 
Dim returnValue As Boolean 

returnValue = instance.TestConnectForDataSourceDefinition(DataSourceDefinition, _
    UserName, Password, 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)]
public bool TestConnectForDataSourceDefinition(
    DataSourceDefinition DataSourceDefinition,
    string UserName,
    string Password,
    out string ConnectError
)
[SoapDocumentMethodAttribute(L"https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/TestConnectForDataSourceDefinition", RequestNamespace = L"https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", 
    ResponseNamespace = L"https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", 
    Use = SoapBindingUse::Literal, ParameterStyle = SoapParameterStyle::Wrapped)]
[SoapHeaderAttribute(L"TrustedUserHeaderValue")]
[SoapHeaderAttribute(L"ServerInfoHeaderValue", Direction = SoapHeaderDirection::Out)]
public:
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
public function TestConnectForDataSourceDefinition(
    DataSourceDefinition : DataSourceDefinition, 
    UserName : String, 
    Password : String, 
    ConnectError : String
) : boolean

매개 변수

  • UserName
    유형: System.String
    The user name to use to test the connection. UserName is used with data sources that prompt for credentials.
  • Password
    유형: System.String
    The password to use to test the connection. Password is used with data sources that prompt for credentials.
  • ConnectError
    유형: System.String%
    A detailed error message. The message is returned when the connection fails. The data source provider provides the detailed message.

반환 값

유형: 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.

주의

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.

참고 항목

참조

ReportingService2010 클래스

ReportService2010 네임스페이스