Closing a Connection
The ODBC provides APIs for disconnecting from a database and releasing resources, as described in Table 1.
Function |
API |
---|---|
Disconnect from a data source. |
|
Release a handle. |
SQLFreeHandle is a generic function for releasing a handle. It can replace the following functions:
|
The following is an example (for details about the complete example, see Obtaining and Processing Data in a Database):
// Disconnect from the data source and release handles. SQLFreeHandle(SQL_HANDLE_STMT,V_OD_hstmt); SQLDisconnect(V_OD_hdbc); SQLFreeHandle(SQL_HANDLE_DBC,V_OD_hdbc); SQLFreeHandle(SQL_HANDLE_ENV, V_OD_Env);
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot