thread exit

Description

Allows Embedded SQL programs to release memory allocated to a particular thread.

Syntax

exec sql thread_exit;

Examples

Example 1

    exec sql include sqlca;
     main()
     {
     ...
     for (;;)
     {
     /* A thread connects to Adaptive Server,
     ** executes various embedded SQL statements,
     ** and then disconnects from
     ** Adaptive Server
     */
     ...
     exec sql thread_exit;
     ...
     }
     /* The exit statement must be the last
     ** embedded SQL statement in the program. 
     */
     exec sql exit;
     }     /* end of main */

Usage

See also

exit