StillExecuting Property

See Also   Example   Applies To   Specifics

Indicates whether or not an asynchronous operation (that is, a method called with the dbRunAsync option) has finished executing (ODBCDirect workspaces only).

Settings And Return Values

The return value is a Boolean that is True if the query is still executing, and False if the query has completed.

Remarks

Use the StillExecuting property to determine if the most recently called asynchronous Execute, MoveLast, OpenConnection, or OpenRecordset method (that is, a method executed with the dbRunAsync option) is complete. While the StillExecuting property is True, any returned object cannot be accessed.

The following table shows what method is evaluated when you use StillExecuting on a particular type of object.

If StillExecuting is used on This asynchronous method is evaluated
Connection Execute or OpenConnection
QueryDef Execute
Recordset MoveLast or OpenRecordset

Once the StillExecuting property on a Connection or Recordset object returns False, follwing the OpenConnection or OpenRecordset call that returns the associated Recordset or Connection object, the object can be referenced. So long as StillExecuting remains True, the object may not be referenced, other than to read the StillExecuting property. When you use the NextRecordset method to complete processing of a Recordset, the StillExecuting property is reset to True while subsequent result sets are retrieved.

Use the Cancel method to terminate execution of a task in progress.