StillExecuting Property

See Also        Applies To

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

Syntax

BOOLGetStillExecuting(VOID);

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. The return value is True if the query is still executing and False if the query has completed. 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
CdbConnection Execute or OpenConnection
CdbQueryDef Execute
CdbRecordset MoveLast or OpenRecordset

Once the StillExecuting property on a CdbConnection or CdbRecordset object returns False, follwing the OpenConnection or OpenRecordset call that returns the associated CdbRecordset or CdbConnection 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 CdbRecordset, 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.