Closing SQL Server Connections

The SqlExit routine closes all SQL Server connections that have been opened by your application and frees the system memory associated with each connection. The following program fragment illustrates the use of SqlExit:

'Close connections.
SqlExit
END

To close a single specified SQL Server connection, use SqlClose.

To free the additional memory associated with a Windows-based application, you must make an additional call to the SqlWinExit function, described in Exiting a Windows-based Application.

For an example of how SqlExit is used, refer to the QUERY sample application. This sample application calls the routine ExitApplication, which in turn calls SqlExit. ExitApplication is defined separately in the INIEXITW.BAS common code modules.