Export (0) Print
Expand All
Expand Minimize

ReportingService2010.GetDataSourceContents Method

Returns the contents of a data source.

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

'Declaration
<SoapDocumentMethodAttribute("http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/GetDataSourceContents", 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 Function GetDataSourceContents ( _
	DataSource As String _
) As DataSourceDefinition
'Usage
Dim instance As ReportingService2010 
Dim DataSource As String 
Dim returnValue As DataSourceDefinition 

returnValue = instance.GetDataSourceContents(DataSource)

Parameters

DataSource
Type: String
The fully qualified URL of the data source including the file name and .rsds or .odc file name extension.

Return Value

Type: ReportService2010.DataSourceDefinition
A DataSourceDefinition object that contains the connection properties for the data source. The Password field is not retrieved from the server and this property of the DataSourceDefinition object is always set to null.

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

SOAP Header Usage

(In) TrustedUserHeaderValue

(Out) ServerInfoHeaderValue

Native Mode Required Permissions

ReadContent

SharePoint Mode Required Permissions

OpenItems

Imports System
Imports System.IO
Imports System.Text
Imports System.Web.Services
Imports System.Web.Services.Protocols

Class Sample

    Public Shared Sub Main()

        Dim rs As New ReportingService2010()
        rs.Url = "http://<Server Name>" + _
            "/_vti_bin/ReportServer/ReportService2010.asmx"
        rs.Credentials = _
            System.Net.CredentialCache.DefaultCredentials

        Dim definition As DataSourceDefinition = Nothing

        Try
            definition = _
                rs.GetDataSourceContents("http://<Server Name>" + _
                "/Docs/Documents/Data Sources/AdventureWorks.rsds")
            Console.WriteLine("Connection String: {0}", _
                definition.ConnectString)
            Console.WriteLine("Extension name: {0}", _
                definition.Extension)

        Catch e As SoapException
            Console.WriteLine(e.Detail.InnerXml.ToString())
        End Try

    End Sub

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

Community Additions

ADD
Show:
© 2014 Microsoft