Export (0) Print
Expand All
Expand Minimize

ReportingService2005.GetDataSourceContents Method

SQL Server 2005

Returns the contents of a data source.

Namespace: Microsoft.WSSUX.ReportingServicesWebService.RSManagementService2005
Assembly: ReportService2005 (in reportingservice2005.dll)

[SoapHeaderAttribute("ServerInfoHeaderValue", Direction=SoapHeaderDirection.Out)] 
[SoapDocumentMethodAttribute("http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/GetDataSourceContents", RequestNamespace="http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", ResponseNamespace="http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped)] 
public DataSourceDefinition GetDataSourceContents (
	string DataSource
)
/** @attribute SoapHeaderAttribute("ServerInfoHeaderValue", Direction=SoapHeaderDirection.Out) */ 
/** @attribute SoapDocumentMethodAttribute("http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/GetDataSourceContents", RequestNamespace="http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", ResponseNamespace="http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped) */ 
public DataSourceDefinition GetDataSourceContents (
	String DataSource
)
SoapHeaderAttribute("ServerInfoHeaderValue", Direction=SoapHeaderDirection.Out) 
SoapDocumentMethodAttribute("http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/GetDataSourceContents", RequestNamespace="http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", ResponseNamespace="http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped) 
public function GetDataSourceContents (
	DataSource : String
) : DataSourceDefinition

Parameters

DataSource

The full path name of the data source.

Return Value

A DataSourceDefinition object that contains the connection properties for the data source.

To compile this code example, you must reference the Reporting Services WSDL and import certain namespaces. For more information, see Compiling and Running Code Examples. The following code example uses the GetDataSourceContents method to retrieve the data source definition of a shared data source and then displays the connection string and extension name as console output:

using System;
using System.Web.Services.Protocols;

class Sample
{
   public static void Main()
   {
      ReportingService2005 rs = new ReportingService2005();
      rs.Credentials = System.Net.CredentialCache.DefaultCredentials;

      DataSourceDefinition definition = null;

      try
      {
         definition = rs.GetDataSourceContents( "/SampleReports/AdventureWorks" );
         Console.WriteLine( "Connection String: {0}", definition.ConnectString );
         Console.WriteLine( "Extension name: {0}", definition.Extension );
      }

      catch ( SoapException e )
      {
         Console.WriteLine( e.Detail.InnerXml.ToString() ); 
      }
   }
}

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.

Target Platforms

Community Additions

ADD
Show:
© 2014 Microsoft