ListManager.WaitOnOperation Method (PIA)
Use this method to wait until an operation is complete or a specified time period has elapsed.
Definition
[Visual Basic .NET]
Imports Microsoft.CommerceServer.Interop.Targeting
…
Public Sub WaitOnOperation(varOpID As Object,
Optional timeout As Integer)
[C#]
using Microsoft.CommerceServer.Interop.Targeting;
…
public void WaitOnOperation(objectvarOpID,
inttimeout);
Parameters
[Visual Basic .NET]
- varOpID
An Object that specifies the ID of the operation on which to wait. For more information about where to obtain Operation IDs, see the Remarks section. - timeout
An optional Integer that specifies a timeout. This method returns either when the specified operation completes or when the number of seconds specified by the timeout parameter has elapsed, whichever happens first. A value of zero (the default) specifies an infinite time to wait for the operation to complete.
[C#]
- varOpID
An object that specifies the ID of the operation on which to wait. For more information about where to obtain Operation IDs, see the Remarks section. - timeout
An int that specifies a timeout. This method returns either when the specified operation completes or when the number of seconds specified by the timeout parameter has elapsed, whichever happens first. A value of zero (the default) specifies an infinite time to wait for the operation to complete.
Exceptions
This method may throw one of many mapped exceptions or an exception of type COMException. See Standard COM Errors for additional details.
[Visual Basic .NET]
The following table shows the custom COM errors that a COMException can wrap.
Value | Description |
---|---|
&H8C400004 | The operation ID does not represent a currently running operation. |
&H8C400003 | Error while executing SQL/ADO operation. |
&H80040007 | The ListManager object has not been properly initialized. |
[C#]
The following table shows the custom COM errors that a COMException can wrap.
Value | Description |
---|---|
0x8C400004 | The operation ID does not represent a currently running operation. |
0x8C400003 | Error while executing SQL/ADO operation. |
0x80040007 | The ListManager object has not been properly initialized. |
Remarks
This method cannot be called from a scripting language such as VBScript or JScript on an ASP page. ASP pages must use alternative techniques when dealing with asynchronous operations and should never wait on them explicitly.
The Operation ID passed to this method in the varOpID parameter can be obtained from any of the following calls when they are executed asynchronously:
In addition, the Operation IDs of all known operations can be retrieved using the GetOperations method.
[Visual Basic .NET]
Example
oListManager.WaitOnOperation ("{454799A2-312B-4F5F-90A0-F514FBA0EC5A}", _
900)
See Also
Copyright © 2005 Microsoft Corporation.
All rights reserved.