Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 » SQL Anywhere Server - Programming » SQL Anywhere Data Access APIs » SQL Anywhere .NET 2.0 API reference » iAnywhere.Data.SQLAnywhere namespace (.NET 2.0) » SACommand class » BeginExecuteReader methods


BeginExecuteReader(AsyncCallback, Object, CommandBehavior) method

Initiates the asynchronous execution of a SQL statement or stored procedure that is described by this SACommand, and retrieves one or more result sets from the server.

Visual Basic

Public Function BeginExecuteReader( _
   ByVal callback As AsyncCallback, _
   ByVal stateObject As Object, _
   ByVal behavior As CommandBehavior _
) As IAsyncResult

public IAsyncResult BeginExecuteReader(
   AsyncCallback callback,
   object stateObject,
   CommandBehavior behavior
  • callback   An [external link] AsyncCallback delegate that is invoked when the command's execution has completed. Pass null (Nothing in Microsoft Visual Basic) to indicate that no callback is required.

  • stateObject   A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback procedure using the [external link] IAsyncResult.AsyncState.

  • behavior   A bitwise combination of [external link] CommandBehavior flags describing the results of the query and its effect on the connection.

Return value

An [external link] IAsyncResult that can be used to poll, wait for results, or both; this value is also needed when invoking EndExecuteReader(IAsyncResult), which returns an SADataReader object that can be used to retrieve the returned rows.

See also