Important: The information in this document is obsolete and should not be used for new development.
Executing Routines Asynchronously
All of the Data Access Manager low-level routines and some of the high-level routines can execute asynchronously--that is, the routine returns control to your application before the routine has completed execution. Your application must call the Event Manager'sWaitNextEvent
function periodically to allow an asynchronous routine to complete execution.
All Data Access Manager routines that can execute asynchronously take as a parameter a pointer to a parameter block known as the asynchronous parameter block. If the value of this pointer is
- Note
- The database extension is responsible for implementing asynchronous execution of Data Access Manager routines. For example, if you call the
DBSend
function to send a query to a data server, and the database extension calls a device driver, the database extension can return control to your application as soon as the device driver has placed its routine in the driver input/output (I/O) queue. If you attempt to execute a routine asynchronously and the database extension that the user has selected does not support asynchronous execution, the routine returns a result code ofrcDBAsyncNotSupp
and terminates execution.NIL
, the function is executed synchronously--that is, the routine does not return control to your application until execution is complete.