Metoda ReportingService2010.TestConnectForDataSourceDefinition
Testy połączenia dla źródło danych.Ta metoda obsługuje bezpośrednie badania źródło danych.
Przestrzeń nazw: ReportService2010
Zestaw: ReportService2010 (w ReportService2010.dll)
Składnia
'Deklaracja
<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
'Użycie
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
Parametry
- DataSourceDefinition
Typ: ReportService2010.DataSourceDefinition
Definicji źródło danych, który definiuje połączenia ze źródłem danych.
- UserName
Typ: System.String
Nazwa użytkownika służy do testowania połączenia. UserNamejest używany ze źródłami danych, które monitują o poświadczenia.
- Password
Typ: System.String
Hasło używane do testowania połączenia. Passwordjest używany ze źródłami danych, które monitują o poświadczenia.
- ConnectError
Typ: System.String%
Szczegółowy komunikat o błędzie.Wiadomość jest zwracana, gdy połączenie nie powiedzie się.Dane dostawca źródłowy dostarcza szczegółowego komunikatu.
Wartość zwracana
Typ: System.Boolean
wartość logiczna wskazuje, czy połączenie jest zakończone pomyślnie.
Ciąg zawierający szczegółowy komunikat o błędzie.Jako parametr wyjściowy, zostanie zwrócony ciąg ConnectError.
Uwagi
W poniższej tabela przedstawiono informacje nagłówka i uprawnienia na tej operacji.
Użycie nagłówek protokołu SOAP |
(Ruch wychodzący)ServerInfoHeaderValue |
Tryb macierzysty wymagane uprawnienia |
ExecuteReportDefinition(System) |
Tryb programu SharePoint wymagane uprawnienia |
Właściwość system potrzebuje EnableLoadReportDefinition zestaw do PRAWDA |
Uprawnienie do wykonać definicja raportu jest wymagany.