Condividi tramite


Metodo ReportingService2010.TestConnectForItemDataSource

Tests the connection for a data source. This method supports the testing of published data sources that are used by reports or models and shared data sources. This method applies to the Report, Model, and Dataset item types.

Spazio dei nomi  ReportService2010
Assembly:  ReportService2010 (in ReportService2010.dll)

Sintassi

'Dichiarazione
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/TestConnectForItemDataSource", 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("ServerInfoHeaderValue", Direction := SoapHeaderDirection.Out)> _
<SoapHeaderAttribute("TrustedUserHeaderValue")> _
Public Function TestConnectForItemDataSource ( _
    ItemPath As String, _
    DataSourceName As String, _
    UserName As String, _
    Password As String, _
    <OutAttribute> ByRef ConnectError As String _
) As Boolean
'Utilizzo
Dim instance As ReportingService2010 
Dim ItemPath As String 
Dim DataSourceName As String 
Dim UserName As String 
Dim Password As String 
Dim ConnectError As String 
Dim returnValue As Boolean 

returnValue = instance.TestConnectForItemDataSource(ItemPath, _
    DataSourceName, UserName, Password, _
    ConnectError)
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/TestConnectForItemDataSource", 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("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)]
[SoapHeaderAttribute("TrustedUserHeaderValue")]
public bool TestConnectForItemDataSource(
    string ItemPath,
    string DataSourceName,
    string UserName,
    string Password,
    out string ConnectError
)
[SoapDocumentMethodAttribute(L"https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/TestConnectForItemDataSource", 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"ServerInfoHeaderValue", Direction = SoapHeaderDirection::Out)]
[SoapHeaderAttribute(L"TrustedUserHeaderValue")]
public:
bool TestConnectForItemDataSource(
    String^ ItemPath, 
    String^ DataSourceName, 
    String^ UserName, 
    String^ Password, 
    [OutAttribute] String^% ConnectError
)
[<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/TestConnectForItemDataSource", 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("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)>]
[<SoapHeaderAttribute("TrustedUserHeaderValue")>]
member TestConnectForItemDataSource : 
        ItemPath:string * 
        DataSourceName:string * 
        UserName:string * 
        Password:string * 
        ConnectError:string byref -> bool
public function TestConnectForItemDataSource(
    ItemPath : String, 
    DataSourceName : String, 
    UserName : String, 
    Password : String, 
    ConnectError : String
) : boolean

Parametri

  • ItemPath
    Tipo: System.String
    The fully qualified URL of the item to which the DataSourceName applies, including the file name and, in SharePoint mode, the extension. The item can be a shared data source, a report, or a report model.
  • DataSourceName
    Tipo: System.String
    The name of the data source for the item.
  • UserName
    Tipo: System.String
    The user name to use to test the connection. UserName is used with data sources that prompt for credentials.
  • Password
    Tipo: System.String
    The password to use to test the connection. Password is used with data sources that prompt for credentials.
  • ConnectError
    Tipo: System.String%
    A detailed error message. The message is returned when the connection fails. The data source provider provides the detailed message.

Valore restituito

Tipo: System.Boolean
A string that contains a detailed error message. The string is returned as the out parameter, ConnectError.A Boolean the indicates whether the connection completed successfully.

Osservazioni

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

SOAP Header Usage

(In) TrustedUserHeaderValue

(Out) ServerInfoHeaderValue

Native Mode Required Permissions

Depends on the item type:

SharePoint Mode Required Permissions

Depends on the item type:

If DataSourceName points to an XML data source, this method does nothing and returns true.

Vedere anche

Riferimento

ReportingService2010 Classe

Spazio dei nomi ReportService2010