Multi-Threaded Applications
In standard, single-threaded embedded SQL (ESQL) applications, ESQL statements are executed in the context of the current database session. In multi-threaded applications, each thread executes ESQL statements in the context of its own current session.
ESQL needs to initialize itself for multi-threaded operation, which should be done either in single-thread mode or while multi-thread protected. ESQL does not provide a single entry point for this initialization but will perform the needed initialization on the first ESQL request. Applications need to make an ESQL call, such as INQUIRE_SQL or IIsqlca(), prior to entering the multi-threaded state.