ReportingService2010.TestConnectForDataSourceDefinition 方法

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

命名空间:  ReportService2010
程序集:  ReportService2010(在 ReportService2010.dll 中)

[SoapDocumentMethodAttribute("http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/TestConnectForDataSourceDefinition", RequestNamespace = "http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer", 
	ResponseNamespace = "http://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
)

参数

DataSourceDefinition
类型:ReportService2010.DataSourceDefinition
The data source definition that defines the connection to the data source.
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.

社区附加资源

添加
显示: