Allows you to perform asynchronous operations on your database in InfoMaker. You can also switch to another Windows process while the retrieval takes place.
By default, InfoMaker operates synchronously.
DIR Sybase DirectConnect
IN9 Informix
JDB JDBC
ODBC (if driver and back-end DBMS support this feature)
O84 Oracle 8.x and Oracle8i (8.1.5 and higher database connections only)
O90 Oracle9i
O10 Oracle 10g
SYC Sybase Adaptive Server Enterprise
Async = value
Parameter |
Description |
---|---|
value |
A value specifying synchronous or asynchronous operation. Values are:
|
Async = 0
Enabling asynchronous operation in InfoMaker is useful when you are executing a complex SQL statement that takes several minutes to return results. If the Async parameter is set to 1, you can do either of the following while the SQL statement is executing:
Work in another window
Cancel the statement before it retrieves the first row of data
When to set Async If you are communicating with the database in code, you can reset the Async value at any time before or after the Transaction object has connected to the database.
How data is retrieved When you retrieve data in a form or report, the following steps occur in order:
The database server compiles and executes the SQL statement.
InfoMaker retrieves (fetches) the first row of data.
InfoMaker retrieves each subsequent row of data.
What happens before the first row is retrieved While the server is compiling and executing the SQL statement and before InfoMaker retrieves the first row of data, you must have done both of the following to enable asynchronous operation (allowing you to cancel the current operation before it retrieves the first row of data):
Coded a RetrieveRow event for the form or report (the code can contain only a comment)
Set the Async parameter to 1
What happens after the first row is retrieved After the first row of data is retrieved and between subsequent row fetches, you must have done only the following to enable asynchronous operation:
Coded a RetrieveRow event for the form or report
After the first row is retrieved, InfoMaker operates asynchronously without your having to set the Async parameter to 1, so you can cancel the current operation anytime after it retrieves the first row of data. Therefore, the Async parameter has no effect in InfoMaker after the first row of data is retrieved.
To enable asynchronous operation, select the Asynchronous check box on the Transaction tab in the Database Profile Setup dialog box.
Example 2 You can set the Async and DBGetTime parameters in a single DBParm statement. DBGetTime specifies the number of seconds you want InfoMaker to wait for a response from the DBMS when you retrieve rows in a form or report. To enable asynchronous operation and set the DBGetTime parameter to 20 seconds, select the Asynchronous check box and type 20 in the Number Of Seconds To Wait box on the Transaction tab in the Database Profile Setup dialog box.