Send feedback on this topic.
Teradata.Client.Provider
NextResultAsync(CancellationToken) Method



Teradata.Client.Provider Namespace > TdDataReader Class > NextResultAsync Method : NextResultAsync(CancellationToken) Method
A Threading.CancellationToken used to indicate that the asynchronous operation should be canceled.
Advances the data reader to the next data returning result set asynchronously.
Syntax
'Declaration
 
Public Overloads Overrides NotOverridable Function NextResultAsync( _
   ByVal cancellationToken As CancellationToken _
) As Task(Of Boolean)
'Usage
 
Dim instance As TdDataReader
Dim cancellationToken As CancellationToken
Dim value As Task(Of Boolean)
 
value = instance.NextResultAsync(cancellationToken)
public override Task<bool> NextResultAsync( 
   CancellationToken cancellationToken
)
public:
Task<bool>^ NextResultAsync( 
   CancellationToken cancellationToken
) override 

Parameters

cancellationToken
A Threading.CancellationToken used to indicate that the asynchronous operation should be canceled.

Return Value

Returns a Task<Boolean> with a value of true if the reader is advanced to the next result set, or false if there are no additional result sets.
Exceptions
ExceptionDescription
The TdDataReader is closed.
The TdConnection is closed, or there is already an Asynchronous method in progress.
Remarks

The data reader allows access to one result set at a time. NextResultAsync is used to advance to the next result set generated by a multi-statement request. If this function raises a TdException for SessionBusy [100062] you may call it again after the blocking operation has completed.

If you cancel this function it will leave the Data Reader in an invalid state. Only Dispose() should be called after canceling this function.

If this function generates a runtime exception that exception will be wrapped within a AggregateException within the returned Task:

Exception Description
OperationCanceledException The asynchronous operation was canceled.
TdException The Advanced SQL Engine returned an error, or .NET Data Provider for Teradata detected an error.
Requirements

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

See Also

Reference

TdDataReader Class
TdDataReader Members
Overload List