Typical C Main API Task Sequence

The API requires that your program call certain functions before others. The basic ordering rules are:

This is the typical order of operations for a simple API application:

  1. Create and initialize an ESS_INIT_T structure.

  2. Initialize the API by calling EssInit().

  3. Allocate any local static or global structures.

  4. Log in to the required server by calling EssLogin() or EssAutoLogin().

  5. Select an active application and database by calling EssSetActive() or EssAutoLogin().

  6. Retrieve (or lock) data by calling EssReport() or related functions.

  7. Update data by calling EssUpdate() or related functions.

  8. Recalculate the database by calling EssCalc() or related functions.

  9. Produce reports against the data by calling EssReport() or related functions.

  10. Log out from the server by calling EssLogout().

  11. Free any local static or global structures.

  12. Terminate the API by calling EssTerm().