ReportingService2005.GetDataSourceContents Yöntemi
Bir veri kaynak içeriğini döndürür.
Ad Alanı: ReportService2005
Derleme: ReportService2005 (ReportService2005 içinde.dll)
Sözdizimi
'Bildirim
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/GetDataSourceContents", RequestNamespace := "https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", _
ResponseNamespace := "https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", _
Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
<SoapHeaderAttribute("ServerInfoHeaderValue", Direction := SoapHeaderDirection.Out)> _
Public Function GetDataSourceContents ( _
DataSource As String _
) As DataSourceDefinition
'Kullanım
Dim instance As ReportingService2005
Dim DataSource As String
Dim returnValue As DataSourceDefinition
returnValue = instance.GetDataSourceContents(DataSource)
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/GetDataSourceContents", RequestNamespace = "https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices",
ResponseNamespace = "https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices",
Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
[SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)]
public DataSourceDefinition GetDataSourceContents(
string DataSource
)
[SoapDocumentMethodAttribute(L"https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/GetDataSourceContents", RequestNamespace = L"https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices",
ResponseNamespace = L"https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices",
Use = SoapBindingUse::Literal, ParameterStyle = SoapParameterStyle::Wrapped)]
[SoapHeaderAttribute(L"ServerInfoHeaderValue", Direction = SoapHeaderDirection::Out)]
public:
DataSourceDefinition^ GetDataSourceContents(
String^ DataSource
)
[<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/GetDataSourceContents", RequestNamespace = "https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices",
ResponseNamespace = "https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices",
Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)>]
[<SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)>]
member GetDataSourceContents :
DataSource:string -> DataSourceDefinition
public function GetDataSourceContents(
DataSource : String
) : DataSourceDefinition
Parametreler
- DataSource
Tür: System.String
Veri dosyasının tam yolunun adını kaynak.
Dönüş Değeri
Tür: ReportService2005.DataSourceDefinition
A DataSourceDefinition nesne için veri kaynak bağlantı özelliklerini içerir
Açıklamalar
Aşağıdaki tablo üstbilgi ve izinler bu işlemi gösterir.
soap üstbilgileri |
(Giden)ServerInfoHeaderValue |
Gerekli izinler |
Örnekler
Bu kod örneği derlemek için Raporlama Hizmetleri wsdl başvuran ve belirli ad alanları almak gerekir.Daha fazla bilgi için, bkz. Compiling and Running Code Examples.Aşağıdaki kod örneği GetDataSourceContents paylaşılan veri kaynaknın veri kaynak tanımını almak için yöntem ve bağlantı görüntüler dize ve konsol çıktısını olarak uzantı adı:
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
Try
definition = rs.GetDataSourceContents("/SampleReports/AdventureWorks")
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 '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;
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() );
}
}
}