Implementing
Building an application to use these agents does require some significant shifts in programming methods. The application should be coded to support:
- Synchronous connections: The application waits for results to arrive.
- Asynchronous connections: The application continues until the results eventually arrive.
The agent should always supply results to the application in the same format, MDB tables.
Our simple sample applications (HOST.MAK and REMOTE.MAK) demonstrate that it can be done. Some suggestions for building applications are:
- Record each request in a local MDB table, giving it a unique ID.
- Put all the controls affected by a query on a form, on a frame control, on a panel control, or on a picture box control, and disable this parent window while the query is pending.
- Place an informational label on the parent window.
- Place the ID into the tag so that the controls affected may be found when the query returns.
- Use one timer only: Whenever it fires, check for all pending requests.