ReportingService2005.BatchHeaderValue Property
The value (BatchHeaderValue object) that represents a unique, system-generated batch ID for multi-method operations in the Reporting Services SOAP API.
네임스페이스: Microsoft.WSSUX.ReportingServicesWebService.RSManagementService2005
어셈블리: ReportService2005 (in reportingservice2005.dll)
구문
‘선언
Public Property BatchHeaderValue As BatchHeader
public BatchHeader BatchHeaderValue { get; set; }
public:
property BatchHeader^ BatchHeaderValue {
BatchHeader^ get ();
void set (BatchHeader^ value);
}
/** @property */
public BatchHeader get_BatchHeaderValue ()
/** @property */
public void set_BatchHeaderValue (BatchHeader value)
public function get BatchHeaderValue () : BatchHeader
public function set BatchHeaderValue (value : BatchHeader)
주의
You can use the BatchHeaderValue property in the SOAP header for Web service calls that you want to batch.
To execute a batch, set the BatchHeaderValue property of the Report Server Web service to a value that is equal to the batch ID generated when the batch was created. For example, the following C# code sets the BatchHeaderValue of the Report Server Web service to a value that is equal to a previously created batch ID and then executes the batch:
rs.BatchHeaderValue = bh;
rs.ExecuteBatch();
For more information about creating a batch ID, see CreateBatch method.
예
To compile the following code example, you must reference the Reporting Services WSDL and import certain namespaces. For more information, see 코드 예제 컴파일 및 실행. The following code example retrieves a list of items in a user's My Reports folder and then deletes the items using a batch operation:
Imports System
Imports System.Web.Services.Protocols
Class Sample
Public Shared Sub Main()
Dim rs As New ReportingService2005()
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
' Return all items in the My Reports folder.
Dim items As CatalogItem() = rs.ListChildren("/My Reports", False)
Dim bh As New BatchHeader()
bh.BatchID = rs.CreateBatch()
rs.BatchHeaderValue = bh
Dim item As CatalogItem
For Each item In items
Console.WriteLine((item.Path + " found."))
rs.DeleteItem(item.Path)
Console.WriteLine((item.Path + " deleted."))
Next item
Try
rs.ExecuteBatch()
Catch ex As SoapException
Console.WriteLine(ex.Message)
Finally
rs.BatchHeaderValue = Nothing
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;
// Return all items in the My Reports folder.
CatalogItem[] items = rs.ListChildren("/My Reports", false);
BatchHeader bh = new BatchHeader();
bh.BatchID = rs.CreateBatch();
rs.BatchHeaderValue = bh;
foreach (CatalogItem item in items)
{
Console.WriteLine(item.Path + " found.");
rs.DeleteItem(item.Path);
Console.WriteLine(item.Path + " deleted.");
}
try
{
rs.ExecuteBatch();
}
catch (SoapException ex)
{
Console.WriteLine(ex.Message);
}
finally
{
rs.BatchHeaderValue = null;
}
}
}
스레드 보안
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.
플랫폼
개발 플랫폼
지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.
대상 플랫폼
지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.
참고 항목
참조
ReportingService2005 Class
ReportingService2005 Members
Microsoft.WSSUX.ReportingServicesWebService.RSManagementService2005 Namespace