Gemstone Data Library
Show/Hide TOC

# AdoDataConnectionRetrieveDataAsync(Int32, String, CancellationToken, Object) Method

Executes the SQL statement using Connection, and returns the first DataTable of result set, if the result set contains at least one table.

## Definition

Namespace: Gemstone.Data
Assembly: Gemstone.Data (in Gemstone.Data.dll) Version: 1.0.178 -- Release Build+ff8c4ec86648cef21d788c1ae4346eaec7de7ef3
C#
View Source Request Example

    public Task<DataTable> RetrieveDataAsync(
    	int timeout,
    	string sqlFormat,
    	CancellationToken cancellationToken,
    	params Object?[] parameters
    )

VB
View Source Request Example

    Public Function RetrieveDataAsync (
    	timeout As Integer,
    	sqlFormat As String,
    	cancellationToken As CancellationToken,
    	ParamArray parameters As Object()
    ) As Task(Of DataTable)

C++
View Source Request Example

    public:
    Task<DataTable^>^ RetrieveDataAsync(
    	int timeout,
    	String^ sqlFormat,
    	CancellationToken cancellationToken,
    	... array<Object^>^ parameters
    )

JavaScript
View Source Request Example

    function RetrieveDataAsync(timeout, sqlFormat, cancellationToken, ... parameters);

#### Parameters

timeout Int32
  The time in seconds to wait for the SQL statement to execute.
sqlFormat String
  Format string for the SQL statement to be executed.
cancellationToken CancellationToken
  Propagates notification that operations should be canceled.
parameters Object
  The parameter values to be used to fill in DbParameter parameters.

#### Return Value

Task DataTable
A DataTable object.

## See Also

#### Reference

AdoDataConnection Class
RetrieveDataAsync Overload
Gemstone.Data Namespace