After you have initialized your CLI application
and processed transactions, you must terminate the application to
properly disconnect from the data source and free resources.
Before you begin
Before terminating your application, you should have initialized
your CLI application
and completed processing of all transactions.
Procedure
To terminate a CLI application:
- Disconnect from the data source by calling
SQLDisconnect().
- Free the connection handle by calling
SQLFreeHandle() with
a HandleType argument of SQL_HANDLE_DBC.
If multiple database connections exist, repeat steps
1 - 2 until all connections are closed and connection handles freed.
- Free the environment handle by calling
SQLFreeHandle() with
a HandleType argument of SQL_HANDLE_ENV.