DataAsyncCommand.AsyncPrepare Method
Prepares, in an asynchronous manner, the specified command to be executed against the data source; the command may then be executed multiple times, with varying parameters.
Namespace: Microsoft.VisualStudio.Data
Assembly: Microsoft.VisualStudio.Data (in Microsoft.VisualStudio.Data.dll)
Syntax
'Declaration
Public Overridable Sub AsyncPrepare ( _
command As String, _
commandType As Integer, _
commandTimeout As Integer, _
asyncCommandEvents As DataAsyncCommandEvents _
)
public virtual void AsyncPrepare(
string command,
int commandType,
int commandTimeout,
DataAsyncCommandEvents asyncCommandEvents
)
public:
virtual void AsyncPrepare(
String^ command,
int commandType,
int commandTimeout,
DataAsyncCommandEvents^ asyncCommandEvents
)
abstract AsyncPrepare :
command:string *
commandType:int *
commandTimeout:int *
asyncCommandEvents:DataAsyncCommandEvents -> unit
override AsyncPrepare :
command:string *
commandType:int *
commandTimeout:int *
asyncCommandEvents:DataAsyncCommandEvents -> unit
public function AsyncPrepare(
command : String,
commandType : int,
commandTimeout : int,
asyncCommandEvents : DataAsyncCommandEvents
)
Parameters
command
Type: System.StringThe command to be prepared.
commandType
Type: System.Int32Format of the command string.
commandTimeout
Type: System.Int32Amount of time, in seconds, before which the command times out.
asyncCommandEvents
Type: Microsoft.VisualStudio.Data.DataAsyncCommandEventsThe object on which this method calls back as the command progresses.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The command or asyncCommandEvents are null. |
ArgumentException | The commandType specifies an invalid type. |
ArgumentOutOfRangeException | The commandTimeout is less than -1. |
NotSupportedException | The provider does not support this method. |
Remarks
This method performs the same operation as the Prepare method, but in an asynchronous manner.
If the value of the commandTimeout parameter is 0, there is no timeout (or, timeout is infinite); if the value is -1, the timeout period is that set by the data provider.
Note
Other exceptions that occur indicate that the parameter derivation failed for a provider-specified reason.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.