Disconnecting from a Data Source or Driver
After disconnecting, the application can call SQLFreeHandle to free the connection. After freeing the connection, it is an application
programming error to use the connection
The application can also reuse the connection, either to connect to a
different data source or reconnect to the same data source. The decision to remain
connected, as opposed to disconnecting and reconnecting later, requires that the
application writer consider the relative costs of each option; both connecting to
a data source and remaining connected can be relatively costly depending on
the connection medium. In making a correct tradeoff, the application must also
make assumptions about the likelihood and timing of further operations on the
same data source.