Send feedback on this topic.
Teradata.Client.Provider
Command Execution using the Asynchronous Programming Model
.NET Data Provider for Teradata > Developer's Guide > Working with the Data Provider Features > Asynchronous Support Overview > Asynchronous Command Execution Overview > Command Execution using the Asynchronous Programming Model

TdCommand supports the Asynchronous Programming Model (APM) of the .NET Framework. This model uses a "Begin" method to start the asynchronous execution, and a corresponding "End" method to finish the execution. The asynchronous methods also make available to applications the following objects that can be used to detect when processing of a request has been completed:

The asynchronous methods will not block when an application sends a request that causes a long-running SQL Engine operation. Once the provider receives the request from an application, it will perform the following tasks before returning control to the application:

Once control has returned to the application, it can perform other tasks. One of the following methods can be used to wait for the processing of the request to complete:

 

The following asynchronous TdCommand methods are supported:

Name Description
BeginExecuteNonQuery() Initiates the asynchronous request that is to be submitted to Teradata.
BeginExecuteNonQuery(AsyncCallback, Object) Overload. 
BeginExecuteReader() Initiates the asynchronous request that is to be submitted to Teradata, and makes one or more result sets available to the application.
BeginExecuteReader(CommandBehavior) Overload. 
BeginExecuteReader(AsyncCallback, Object) Overload. 
BeginExecuteReader(AsyncCallback, Object, CommandBehavior) Overload. 
EndExecuteNonQuery(IAsyncResult) Finishes the execution of the corresponding BeginExecuteNonQuery.
EndExecuteReader(IAsynchResult) Finishes the execution of the corresponding BeginExecuteReader.