SQLFreeHandle
Description
Releases resources associated with a specific environment, connection, or statement handle. It replaces the ODBC 2.x functions: SQLFreeEnv, SQLFreeConnect, and SQLFreeStmt.
Prototype
1 2 |
SQLRETURN SQLFreeHandle(SQLSMALLINT HandleType, SQLHANDLE Handle); |
Parameter
Keyword |
Description |
---|---|
HandleType |
Type of handle to be freed by SQLFreeHandle. The value must be one of the following:
If none of them is the value of HandleType, SQLFreeHandle returns SQL_INVALID_HANDLE. |
Handle |
Name of the handle to be freed. |
Return Value
- SQL_SUCCESS indicates that the call succeeded.
- SQL_SUCCESS_WITH_INFO indicates that some warning information is displayed.
- SQL_ERROR indicates major errors, such as memory allocation and connection failures.
- SQL_INVALID_HANDLE indicates that invalid handles were called. This value may also be returned by other APIs.
Precautions
If SQLFreeHandle returns SQL_ERROR, the handle is still valid.
Examples
See Examples.
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