Send feedback on this topic.
Teradata.Client.Provider
EndExecuteReader Method



Teradata.Client.Provider Namespace > TdCommand Class : EndExecuteReader Method
IAsyncResult object returned from the corresponding BeginExecuteReader
Completes the asynchronous execution of a corresponding BeginExecuteReader.
Syntax
'Declaration
 
Public Function EndExecuteReader( _
   ByVal asyncResult As IAsyncResult _
) As TdDataReader
'Usage
 
Dim instance As TdCommand
Dim asyncResult As IAsyncResult
Dim value As TdDataReader
 
value = instance.EndExecuteReader(asyncResult)
public TdDataReader EndExecuteReader( 
   IAsyncResult asyncResult
)
public:
TdDataReader^ EndExecuteReader( 
   IAsyncResult^ asyncResult
) 

Parameters

asyncResult
IAsyncResult object returned from the corresponding BeginExecuteReader

Return Value

The TdDataReader object that is used to retrieve the data.
Exceptions
ExceptionDescription
Can be thrown because more in-out/out parameters have been specified than returned from the stored procedure.
Can be thrown because of one of the following: 1) EndExecuteReader was called more than once for the corresponding BeginExecuteReader, 2) EndExecuteReader does not match the call to the corresponding method used for execution. For example, EndExecuteReader was called to end execution of a call to BeginExecuteNonQuery. 3) The command has been disposed.
Can be thrown because of one of the following errors: 1) Teradata returned an error. 2) The Data Provider detected an error. .
Remarks

An EndExecuteReader must follow a BeginExecuteReader in order to retrieve the data reader object, initialize the out/in-out parameter for stored procedures, or catch TdExceptions that may have been thrown by the provider or Teradata.

If EndExecuteReader is called before the command has completed processing it will block until the database operation is finished.

Example
See TdCommand.BeginExecuteReader for a coding example.
Requirements

Target Platforms: Windows 8.1, Windows 10, Windows Server 2012 R2, Windows Server 2016, Windows Server 2019

See Also

Reference

TdCommand Class
TdCommand Members