Closes Client-Library and deallocates all Embedded SQL resources allocated to your program.
exec sql exit;
exec sql include sqlca;
main()
{
/* The body of the main function goes here,
** including various Embedded SQL statements.
*/
...
/* The exit statement must be the last
** embedded SQL statement in the program.
*/
exec sql exit;
} /* end of main */
The exit statement closes all connections that your program opened. Also, exit deallocates all Embedded SQL resources and Client-Library resources allocated to your program.
Although the exit statement is valid on all platforms, it is required only on some. For more information, see the Open Client/Server Programmer’s Supplement.
You cannot use Client-Library functions after using the exit statement, unless you initialize Client-Library again. See the Open Client Client-Library/C Programmer’s Guide for information about initializing Client-Library.
The exit statement is a Sybase extension; it is not defined in the SQL standard.
disconnect