Export (0) Print
Expand All
Expand Minimize

ReportingService2010::SetDataSourceContents Method

Sets the connection properties associated with a DataSource.

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

[SoapHeaderAttribute(L"ServerInfoHeaderValue", Direction = SoapHeaderDirection::Out)]
[SoapHeaderAttribute(L"TrustedUserHeaderValue")]
[SoapDocumentMethodAttribute(L"http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/SetDataSourceContents", 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)]
public:
void SetDataSourceContents(
	String^ DataSource, 
	DataSourceDefinition^ Definition
)

Parameters

DataSource
Type: String
The fully qualified URL for the data source including the file name and .rsds file name extension.
Definition
Type: ReportService2010::DataSourceDefinition
A DataSourceDefinition object that contains the definition for the data source.

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

SOAP Header Usage

(In) TrustedUserHeaderValue

(Out) ServerInfoHeaderValue

Native Mode Required Permissions

UpdateContent

SharePoint Mode Required Permissions

EditListItems

To remove properties that are part of the data source definition, set the values of those properties to nullptr (Nothing in Visual Basic).

If you set the CredentialRetrieval property of the data source definition to Integrated or Prompt, do not supply values for UserName or Password. Doing so causes a SOAP exception with the error code rsInvalidElementCombination.

If you set the CredentialRetrieval property of the data source definition to Integrated or Store, any value that you supply for the Prompt property is not saved.

With subscriptions, you may have to store credentials in the report server database so that the subscriptions can run unattended.

Setting the ConnectString property of the data source definition to nullptr (Nothing in Visual Basic) causes a SOAP exception with the error code rsInvalidXML. If you do not want to supply a value for ConnectString, set its value to an empty string ("").

This method does not support changing Office Data Connections or files that have the .odc file name extension. Doing so causes an rsNotSupported error. For data sources with extensions other than .rsds or .odc, an rsWrongType error is returned.

No code example is currently available or this language may not be supported.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft