Export (0) Print
Expand All
Expand Minimize

ReportingService2010::TestConnectForItemDataSource Method

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.

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

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

Parameters

ItemPath
Type: 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
Type: System::String
The name of the data source for the item.
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 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.

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:

  • Report, DataSet: OpenItems() on ItemPath

  • Report using a model or a shared datasource: OpenItems() on DataSourceName

  • DataSource: OpenItems()

  • Model: OpenItems()

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

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft