func (conn *Connection) Close() *ODBCError { if conn.connected { ret := C.SQLDisconnect(C.SQLHDBC(conn.Dbc)) if !Success(ret) { err := FormatError(C.SQL_HANDLE_DBC, conn.Dbc) return err } ret = C.SQLFreeHandle(C.SQL_HANDLE_DBC, conn.Dbc) if !Success(ret) { err := FormatError(C.SQL_HANDLE_DBC, conn.Dbc) return err } conn.connected = false } return nil }
func SQLFreeHandle(handleType SQLSMALLINT, handle SQLHANDLE) (ret SQLRETURN) { r := C.SQLFreeHandle(C.SQLSMALLINT(handleType), C.SQLHANDLE(handle)) return SQLRETURN(r) }
func (stmt *Statement) free() { C.SQLFreeHandle(C.SQL_HANDLE_STMT, stmt.handle) }