SqlCommand.EndExecuteNonQuery Method (IAsyncResult)
Finishes asynchronous execution of a Transact-SQL statement.
Assembly: System.Data (in System.Data.dll)
asyncResult parameter is null (Nothing in Microsoft Visual Basic)
In some situations, IAsyncResult can be set to IsCompleted incorrectly. If this occurs and is called, EndExecuteNonQuery could raise a SqlException error if the amount of time specified in CommandTimeout elapsed and the asynchronous operation specified with BeginExecuteNonQuery is not complete. To correct this situation, you should either increase the value of CommandTimeout or reduce the work being done by the asynchronous operation.
When you call BeginExecuteNonQuery to execute a Transact-SQL statement, you must call in order to complete the operation. If the process of executing the command has not yet finished, this method blocks until the operation is complete. Users can verify that the command has completed its operation by using the IAsyncResult instance returned by the BeginExecuteNonQuery method. If a callback procedure was specified in the call to BeginExecuteNonQuery, this method must be called.
Available since 2.0