ReportingService2005.GetDataSourceContents 메서드

Returns the contents of a data source.

네임스페이스:  ReportService2005
어셈블리:  ReportService2005(ReportService2005.dll)


Public Function GetDataSourceContents ( _
    DataSource As String _
) As DataSourceDefinition
‘사용 방법
Dim instance As ReportingService2005 
Dim DataSource As String 
Dim returnValue As DataSourceDefinition 

returnValue = instance.GetDataSourceContents(DataSource)
public DataSourceDefinition GetDataSourceContents(
    string DataSource
DataSourceDefinition^ GetDataSourceContents(
    String^ DataSource
member GetDataSourceContents : 
        DataSource:string -> DataSourceDefinition
public function GetDataSourceContents(
    DataSource : String
) : DataSourceDefinition

매개 변수

  • DataSource
    유형: System.String
    The full path name of the data source.

반환 값

유형: ReportService2005.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 Headers

(Out) ServerInfoHeaderValue

Required Permissions


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:

Imports System
Imports System.Web.Services.Protocols

Class Sample
   Public Shared Sub Main()
      Dim rs As New ReportingService2005()
      rs.Credentials = System.Net.CredentialCache.DefaultCredentials

      Dim definition As DataSourceDefinition = Nothing

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

      Catch e As SoapException
      End Try
   End Sub 'Main
End Class 'Sample
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;

         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() ); 

참고 항목


ReportingService2005 클래스

ReportService2005 네임스페이스