Configuration Issues > Asynchronous Processing Mode
 
Asynchronous Processing Mode
This section describes what this processing mode does, how it changes the application behavior, what drivers currently support this mode and what member functions use it. The following items are described:
*Principle
*Important Behavior Change
*Drivers that Support Asynchronous Processing
*Functions that Use Asynchronous Processing
Principle
When this mode is turned on, the execution of a query immediately returns control to the application.
The application must then be designed so as to call the function again with the very same arguments until the query completes. To test the completion status, the application calls the function IldRequest::isCompleted, which returns:
*IlTrue if:
*an error was raised, or
*the caller is inactive, or
*the query is completed.
*IlFalse if the execution of the query is still in progress.
Important Behavior Change
When the asynchronous processing mode is turned on, only ONE query can be active at a time for a given connection. In this case, it is impossible to use two different IldRequest objects pertaining to the same connection (an IldDbms object) simultaneously. However, it is possible to allocate several IldRequest objects for the same connection, and use any of these requests as soon as the previous operation is completed.
Drivers that Support Asynchronous Processing
The function IldDbms::isAsyncSupported returns IlTrue when the driver supports the asynchronous processing mode. Currently these drivers are:
*oracle9, 10 and 11
*sybase
*mssql
*odbc, when the underlying ODBC driver supports it.
Functions that Use Asynchronous Processing
When the asynchronous processing mode is turned on, the following member functions must be checked for completion before accessing their results:
*IldDbms class
*IldDbms::readRelation
*IldDbms::readRelationNames (overloaded)
*IldDbms::readRelationOwners
*IldDbms::subscribeEvent
*IldDbms::unSubscribeEvent
*IldRelation class
*IldRelation::getForeignKeys
*IldRelation::getIndexes
*IldRelation::getPrimaryKey
*IldRelation::getSpecialColumns
For these four functions, check with:
rel->getDbms().isCompleted()
For these two classes, the returned values are significant if, and only if, the following test holds:
dbms->isCompleted() && !dbms->isErrorRaised()
*IldRequest class
*IldRequest::execute (overloaded)
*IldRequest::fetch
*IldRequest::insertBinary
*IldRequest::insertLongText
*IldRequest::getLargeObject
*IldRequest::getLargeObjectChunk
*IldRequest::parse
*IldRequest::startGetLargeObject

Version 5.8
Copyright © 2014, Rogue Wave Software, Inc. All Rights Reserved.