• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ OCIHandleFree函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中OCIHandleFree函数的典型用法代码示例。如果您正苦于以下问题:C++ OCIHandleFree函数的具体用法?C++ OCIHandleFree怎么用?C++ OCIHandleFree使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了OCIHandleFree函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: complex_logoff_execute

static VALUE complex_logoff_execute(void *arg)
{
    complex_logoff_arg_t *cla = (complex_logoff_arg_t *)arg;
    OCIError *errhp = oci8_errhp;
    sword rv = OCI_SUCCESS;

    OCITransRollback(cla->svchp, errhp, OCI_DEFAULT);

    if (cla->state & OCI8_STATE_SESSION_BEGIN_WAS_CALLED) {
        rv = OCISessionEnd(cla->svchp, oci8_errhp, cla->usrhp, OCI_DEFAULT);
        cla->state &= ~OCI8_STATE_SESSION_BEGIN_WAS_CALLED;
    }
    if (cla->state & OCI8_STATE_SERVER_ATTACH_WAS_CALLED) {
        rv = OCIServerDetach(cla->srvhp, oci8_errhp, OCI_DEFAULT);
        cla->state &= ~OCI8_STATE_SERVER_ATTACH_WAS_CALLED;
    }
    if (cla->usrhp != NULL) {
        OCIHandleFree(cla->usrhp, OCI_HTYPE_SESSION);
    }
    if (cla->srvhp != NULL) {
        OCIHandleFree(cla->srvhp, OCI_HTYPE_SERVER);
    }
    if (cla->svchp != NULL) {
        OCIHandleFree(cla->svchp, OCI_HTYPE_SVCCTX);
    }
    free(cla);
    return (VALUE)rv;
}
开发者ID:jcasts,项目名称:ruby-oci8,代码行数:28,代码来源:oci8.c


示例2: yada_oracle_disconnect

static void yada_oracle_disconnect(yada_t *_yada)
{
  yada_rc_t *yrc;

  
  /* invalidate all result sets associated with this connection */
  for(yrc=_yada->_priv->rc_head; yrc; yrc=yrc->next)
    {
    if(yrc->t != YADA_RESULT)
      continue;

    ((extinfo*)yrc->data)->invalid = 1;
    OCIStmtRelease(((extinfo*)yrc->data)->stmt, _yada->_mod->err,
     NULL, 0, OCI_DEFAULT);
    OCIHandleFree(((extinfo*)yrc->data)->stmt, OCI_HTYPE_STMT);
    }

  /* cleanup OCI */
  if(_yada->_mod->ses)
    OCISessionEnd(_yada->_mod->ctx, _yada->_mod->err, _yada->_mod->ses, OCI_DEFAULT);
  if(_yada->_mod->srv)
    OCIServerDetach(_yada->_mod->srv, _yada->_mod->err, OCI_DEFAULT);
  if(_yada->_mod->env)
    OCIHandleFree(_yada->_mod->env, OCI_HTYPE_ENV);

  /* re-initialize extended structure */
  _yada->_mod->env = NULL;
  _yada->_mod->err = NULL;
  _yada->_mod->srv = NULL;
  _yada->_mod->ctx = NULL;
  _yada->_mod->ses = NULL;
  _yada->errmsg = _yada->_priv->errbuf;
}
开发者ID:pruiz,项目名称:yada,代码行数:33,代码来源:yada_oracle.c


示例3: conn_close

/*
** Close a Connection object.
*/
static int conn_close (lua_State *L) {
	env_data *env;
	conn_data *conn = (conn_data *)luaL_checkudata (L, 1, LUASQL_CONNECTION_OCI8);
	luaL_argcheck (L, conn != NULL, 1, LUASQL_PREFIX"connection expected");
	if (conn->closed) {
		lua_pushboolean (L, 0);
		return 1;
	}
	if (conn->cur_counter > 0)
		return luaL_error (L, LUASQL_PREFIX"there are open cursors");

	/* Nullify structure fields. */
	conn->closed = 1;
	if (conn->svchp) {
		if (conn->loggedon)
			OCILogoff (conn->svchp, conn->errhp);
		else
			OCIHandleFree ((dvoid *)conn->svchp, OCI_HTYPE_SVCCTX);
	}
	if (conn->errhp)
		OCIHandleFree ((dvoid *)conn->errhp, OCI_HTYPE_ERROR);
	/* Decrement connection counter on environment object */
	lua_rawgeti (L, LUA_REGISTRYINDEX, conn->env);
	env = lua_touserdata (L, -1);
	env->conn_counter--;
	luaL_unref (L, LUA_REGISTRYINDEX, conn->env);

	lua_pushboolean (L, 1);
	return 1;
}
开发者ID:Abyss116,项目名称:luaplus51-all,代码行数:33,代码来源:ls_oci8.c


示例4: OCIHandleFree

OGROCISession::~OGROCISession()

{
    if( hDescribe != NULL )
        OCIHandleFree((dvoid *)hDescribe, (ub4)OCI_HTYPE_DESCRIBE);

    if( hSvcCtx != NULL )
    {
        OCISessionEnd(hSvcCtx, hError, hSession, (ub4) 0);

        if( hSvcCtx && hError)
            OCIServerDetach(hServer, hError, (ub4) OCI_DEFAULT);

        if( hServer )
            OCIHandleFree((dvoid *) hServer, (ub4) OCI_HTYPE_SERVER);

        if( hSvcCtx )
            OCIHandleFree((dvoid *) hSvcCtx, (ub4) OCI_HTYPE_SVCCTX);

        if( hError )
            OCIHandleFree((dvoid *) hError, (ub4) OCI_HTYPE_ERROR);

        if( hSession )
            OCIHandleFree((dvoid *) hSession, (ub4) OCI_HTYPE_SESSION);
    }

    CPLFree( pszUserid );
    CPLFree( pszPassword );
    CPLFree( pszDatabase );
}
开发者ID:AsherBond,项目名称:MondocosmOS,代码行数:30,代码来源:ogrocisession.cpp


示例5: oracle_session_close

gboolean
oracle_session_close (GSQLSession *session, gchar *buffer)
{
    GSQL_TRACE_FUNC;

    /* End session and detach from server */
    GSQLEOracleSession *o_session;

    o_session = (GSQLEOracleSession *) session->spec;

    gsql_session_close (session);

    OCISessionEnd (o_session->svchp, o_session->errhp,
                   o_session->usrhp, OCI_DEFAULT);
    OCIServerDetach (o_session->srvhp, o_session->errhp,
                     OCI_DEFAULT);
    OCIHandleFree ((dvoid *)o_session->errhp, OCI_HTYPE_ERROR);
    OCIHandleFree ((dvoid *)o_session->srvhp, OCI_HTYPE_SERVER);
    OCIHandleFree ((dvoid *)o_session->svchp, OCI_HTYPE_SVCCTX);
    OCIHandleFree ((dvoid *)o_session->usrhp, OCI_HTYPE_SESSION);
    OCIHandleFree ((dvoid *)o_session->envhp, OCI_HTYPE_ENV);

    g_free(o_session);

    return TRUE;
}
开发者ID:eaglexmw,项目名称:gsql,代码行数:26,代码来源:oracle.c


示例6: o_shutdown

static int o_shutdown (void) /* {{{ */
{
  size_t i;

  for (i = 0; i < databases_num; i++)
    if (databases[i]->oci_service_context != NULL)
    {
      OCIHandleFree (databases[i]->oci_service_context, OCI_HTYPE_SVCCTX);
      databases[i]->oci_service_context = NULL;
    }

  for (i = 0; i < queries_num; i++)
  {
    OCIStmt *oci_statement;

    oci_statement = udb_query_get_user_data (queries[i]);
    if (oci_statement != NULL)
    {
      OCIHandleFree (oci_statement, OCI_HTYPE_STMT);
      udb_query_set_user_data (queries[i], NULL);
    }
  }

  OCIHandleFree (oci_env, OCI_HTYPE_ENV);
  oci_env = NULL;

  udb_query_free (queries, queries_num);
  queries = NULL;
  queries_num = 0;

  return (0);
} /* }}} int o_shutdown */
开发者ID:strizhechenko,项目名称:collectd,代码行数:32,代码来源:oracle.c


示例7: FreeHandles

void FreeHandles() {
	OCIHandleFree(hser, OCI_HTYPE_SERVER);
	OCIHandleFree(herr, OCI_HTYPE_ERROR);
	OCIHandleFree(husr, OCI_HTYPE_SESSION);
	OCIHandleFree(hsvc, OCI_HTYPE_SVCCTX);
	OCIHandleFree(hsql, OCI_HTYPE_STMT);
}
开发者ID:boyfaceone,项目名称:codebase,代码行数:7,代码来源:oracli.c


示例8: _sessionDelete

void _sessionDelete(unsigned int i)
{	
	std::map<uint32_t, sessionInfo*>::iterator pos = _sessions.find(i);
	
	if(pos != _sessions.end()) 
	{
		
		sessionInfo *obj = pos->second;
		
		OCIHandleFree (obj->errhp, OCI_HTYPE_ERROR);
		OCIHandleFree (obj->srvhp, OCI_HTYPE_SERVER);		
		OCIHandleFree (obj->svchp, OCI_HTYPE_SVCCTX);
		OCIHandleFree (obj->authp, OCI_HTYPE_SESSION);		
		OCIHandleFree (obj->envhp, OCI_HTYPE_ENV);
		
		obj->errhp = 0;
		obj->srvhp = 0;
		obj->svchp = 0;		
		obj->authp = 0;	
		obj->envhp = 0;	
		
		delete obj;
		
		_sessions.erase(pos);
	}
}
开发者ID:miyako,项目名称:4d-plugin-4d-for-oracle,代码行数:26,代码来源:4DPlugin.cpp


示例9: OracleConnection_executeQuery

ResultSet_T OracleConnection_executeQuery(T C, const char *sql, va_list ap) {
        OCIStmt* stmtp;
        va_list  ap_copy;
        assert(C);
        C->rowsChanged = 0;
        va_copy(ap_copy, ap);
        StringBuffer_vset(C->sb, sql, ap_copy);
        va_end(ap_copy);
        StringBuffer_trim(C->sb);
        /* Build statement */
        C->lastError = OCIHandleAlloc(C->env, (void **)&stmtp, OCI_HTYPE_STMT, 0, NULL);
        if (C->lastError != OCI_SUCCESS && C->lastError != OCI_SUCCESS_WITH_INFO)
                return NULL;
        C->lastError = OCIStmtPrepare(stmtp, C->err, StringBuffer_toString(C->sb), StringBuffer_length(C->sb), OCI_NTV_SYNTAX, OCI_DEFAULT);
        if (C->lastError != OCI_SUCCESS && C->lastError != OCI_SUCCESS_WITH_INFO) {
                OCIHandleFree(stmtp, OCI_HTYPE_STMT);
                return NULL;
        }
        /* Execute and create Result Set */
        C->lastError = OCIStmtExecute(C->svc, stmtp, C->err, 0, 0, NULL, NULL, OCI_DEFAULT);    
        if (C->lastError != OCI_SUCCESS && C->lastError != OCI_SUCCESS_WITH_INFO) {
                ub4 parmcnt = 0;
                OCIAttrGet(stmtp, OCI_HTYPE_STMT, &parmcnt, NULL, OCI_ATTR_PARSE_ERROR_OFFSET, C->err);
                DEBUG("Error occured in StmtExecute %d (%s), offset is %d\n", C->lastError, OracleConnection_getLastError(C), parmcnt);
                OCIHandleFree(stmtp, OCI_HTYPE_STMT);
                return NULL;
        }
        C->lastError = OCIAttrGet(stmtp, OCI_HTYPE_STMT, &C->rowsChanged, 0, OCI_ATTR_ROW_COUNT, C->err);
        if (C->lastError != OCI_SUCCESS && C->lastError != OCI_SUCCESS_WITH_INFO)
                DEBUG("OracleConnection_execute: Error in OCIAttrGet %d (%s)\n", C->lastError, OracleConnection_getLastError(C));
        return ResultSet_new(OracleResultSet_new(stmtp, C->env, C->usr, C->err, C->svc, true, C->maxRows), (Rop_T)&oraclerops);
}
开发者ID:EchoLiao,项目名称:libzdb,代码行数:32,代码来源:OracleConnection.c


示例10: main

int main(int argc, char *argv[])
{
  OCIError *errhp = NULL;

  printf("stage4: Demonstrating OCI statement caching \n");

  /* parse command line options */
  parse_options(argc, argv);
  
  checkenv(envhp, OCIEnvCreate(&envhp,                /* returned env handle */
                               OCI_THREADED,         /* initialization modes */
                               NULL, NULL, NULL, NULL, /* callbacks, context */
                               (size_t) 0,    /* extra memory size: optional */
                               (void **) NULL));    /* returned extra memory */

  /* allocate error handle
   * note: for OCIHandleAlloc(), we always check error on environment handle
   */
  checkenv(envhp, OCIHandleAlloc(envhp,                /* environment handle */
                                 (void **) &errhp,    /* returned err handle */
                                 OCI_HTYPE_ERROR,/*type of handle to allocate*/
                                 (size_t) 0,  /* extra memory size: optional */
                                 (void **) NULL));  /* returned extra memory */

  create_session_pool(envhp, errhp, &poolName, &poolNameLen);

  /* allocate auth handle
   * note: for OCIHandleAlloc(), we check error on environment handle
   */
  checkenv(envhp, OCIHandleAlloc(envhp,
                          (void **) &authp, OCI_HTYPE_AUTHINFO,
                          (size_t) 0, (void **) NULL));

  /* setup username and password */
  checkerr(errhp, OCIAttrSet(authp, OCI_HTYPE_AUTHINFO,
                             (void *) username, strlen((char *)username),
                             OCI_ATTR_USERNAME, errhp));

  checkerr(errhp, OCIAttrSet(authp, OCI_HTYPE_AUTHINFO,
                            apppassword, strlen((char *) apppassword),
                            OCI_ATTR_PASSWORD, errhp));

  spawn_threads(envhp, errhp, &thread_function);
  
  /* Destroy the session pool */
  OCISessionPoolDestroy(spoolhp, errhp, OCI_DEFAULT);

  /* clean up */
  if (authp)
    OCIHandleFree(authp, OCI_HTYPE_AUTHINFO);
  if (spoolhp)
    OCIHandleFree(spoolhp, OCI_HTYPE_SPOOL); 
  if (errhp)
    OCIHandleFree(errhp, OCI_HTYPE_ERROR);
  if (envhp)
    OCIHandleFree(envhp, OCI_HTYPE_ENV);
  
  return 0;
}
开发者ID:Laukien,项目名称:test,代码行数:59,代码来源:stage4.c


示例11: conn_execute

/*
** Execute an SQL statement.
** Return a Cursor object if the statement is a query, otherwise
** return the number of tuples affected by the statement.
*/
static int conn_execute (lua_State *L) {
	env_data *env;
	conn_data *conn = getconnection (L);
	const char *statement = luaL_checkstring (L, 2);
	sword status;
	ub4 prefetch = 0;
	ub4 iters;
	ub4 mode;
	ub2 type;
	OCIStmt *stmthp;

	/* get environment */
	lua_rawgeti (L, LUA_REGISTRYINDEX, conn->env);
	if (!lua_isuserdata (L, -1))
		luaL_error(L,LUASQL_PREFIX"invalid environment in connection!");
	env = (env_data *)lua_touserdata (L, -1);
	/* statement handle */
	ASSERT (L, OCIHandleAlloc ((dvoid *)env->envhp, (dvoid **)&stmthp,
		OCI_HTYPE_STMT, (size_t)0, (dvoid **)0), conn->errhp);
	ASSERT (L, OCIAttrSet ((dvoid *)stmthp, (ub4)OCI_HTYPE_STMT,
		(dvoid *)&prefetch, (ub4)0, (ub4)OCI_ATTR_PREFETCH_ROWS,
		conn->errhp), conn->errhp);
	ASSERT (L, OCIStmtPrepare (stmthp, conn->errhp, (text *)statement,
		(ub4) strlen(statement), (ub4) OCI_NTV_SYNTAX, (ub4) OCI_DEFAULT),
		conn->errhp);
	/* statement type */
	ASSERT (L, OCIAttrGet ((dvoid *)stmthp, (ub4) OCI_HTYPE_STMT,
		(dvoid *)&type, (ub4 *)0, (ub4)OCI_ATTR_STMT_TYPE, conn->errhp),
		conn->errhp);
	if (type == OCI_STMT_SELECT)
		iters = 0;
	else
		iters = 1;
	if (conn->auto_commit)
		mode = OCI_COMMIT_ON_SUCCESS;
	else
		mode = OCI_DEFAULT;
	/* execute statement */
	status = OCIStmtExecute (conn->svchp, stmthp, conn->errhp, iters,
		(ub4)0, (CONST OCISnapshot *)NULL, (OCISnapshot *)NULL, mode);
	if (status && (status != OCI_NO_DATA)) {
		OCIHandleFree ((dvoid *)stmthp, OCI_HTYPE_STMT);
		return checkerr (L, status, conn->errhp);
	}
	if (type == OCI_STMT_SELECT) {
		/* create cursor */
		return create_cursor (L, 1, conn, stmthp, statement);
	} else {
		/* return number of rows */
		int rows_affected;
		ASSERT (L, OCIAttrGet ((dvoid *)stmthp, (ub4)OCI_HTYPE_STMT,
			(dvoid *)&rows_affected, (ub4 *)0,
			(ub4)OCI_ATTR_ROW_COUNT, conn->errhp), conn->errhp);
		OCIHandleFree ((dvoid *)stmthp, OCI_HTYPE_STMT);
		lua_pushnumber (L, rows_affected);
		return 1;
	}
}
开发者ID:Abyss116,项目名称:luaplus51-all,代码行数:63,代码来源:ls_oci8.c


示例12: cleanup

/* Freeing the allocated handles */
static void cleanup ()
{
  OCISessionEnd (svchp, errhp, sesnhp, OCI_DEFAULT );
  OCIHandleFree((dvoid *) sesnhp, OCI_HTYPE_SESSION);
  OCIServerDetach(svrhp, errhp, OCI_DEFAULT );
  OCIHandleFree((dvoid *) svrhp, OCI_HTYPE_SERVER);
  OCIHandleFree((dvoid *) svchp, OCI_HTYPE_SVCCTX);
  OCIHandleFree((dvoid *) errhp, OCI_HTYPE_ERROR);
  return;
}/* End of cleanup() */
开发者ID:RicardoVivas,项目名称:oracle-scripts,代码行数:11,代码来源:cdemoin1.c


示例13: OCISessionEnd

	~connection()
	{
		OCISessionEnd(svcctx, error, session, OCI_DEFAULT);
		OCIServerDetach(server, error, OCI_DEFAULT);

		OCIHandleFree(session, OCI_HTYPE_SESSION);
		OCIHandleFree(svcctx, OCI_HTYPE_SVCCTX);
		OCIHandleFree(error, OCI_HTYPE_ERROR);
		OCIHandleFree(server, OCI_HTYPE_SERVER);
	}
开发者ID:purpleKarrot,项目名称:async-db,代码行数:10,代码来源:connection.hpp


示例14: zbx_db_close

void	zbx_db_close()
{
#if defined(HAVE_IBM_DB2)
	if (ibm_db2.hdbc)
	{
		SQLDisconnect(ibm_db2.hdbc);
		SQLFreeHandle(SQL_HANDLE_DBC, ibm_db2.hdbc);
	}

	if (ibm_db2.henv)
		SQLFreeHandle(SQL_HANDLE_ENV, ibm_db2.henv);

	memset(&ibm_db2, 0, sizeof(ibm_db2));
#elif defined(HAVE_MYSQL)
	mysql_close(conn);
	conn = NULL;
#elif defined(HAVE_ORACLE)
	/* deallocate statement handle */
	if (NULL != oracle.stmthp)
	{
		OCIHandleFree((dvoid *)oracle.stmthp, OCI_HTYPE_STMT);
		oracle.stmthp = NULL;
	}

	if (NULL != oracle.svchp)
	{
		OCILogoff(oracle.svchp, oracle.errhp);
		oracle.svchp = NULL;
	}

	if (NULL != oracle.errhp)
	{
		OCIHandleFree(oracle.errhp, OCI_HTYPE_ERROR);
		oracle.errhp = NULL;
	}

	if (NULL != oracle.envhp)
	{
		OCIHandleFree((dvoid *)oracle.envhp, OCI_HTYPE_ENV);
		oracle.envhp = NULL;
	}

	if (NULL != oracle.srvhp)
	{
		OCIHandleFree(oracle.srvhp, OCI_HTYPE_SERVER);
		oracle.srvhp = NULL;
	}
#elif defined(HAVE_POSTGRESQL)
	PQfinish(conn);
	conn = NULL;
#elif defined(HAVE_SQLITE3)
	sqlite3_close(conn);
	conn = NULL;
#endif
}
开发者ID:nabnut,项目名称:zabbix2.0-cookies,代码行数:55,代码来源:db.c


示例15: FC_FUNC_

void FC_FUNC_(oraclesim_delete, ORACLESIM_DELETE) (OracleDbConnection **fdbconnid) {
  OracleDbConnection *dbconnid = *fdbconnid;
  if (dbconnid != NULL) {
    if (dbconnid->svchp != NULL) OCILogoff(dbconnid->svchp, dbconnid->errhp);
    if (dbconnid->stmthp != NULL) OCIHandleFree(dbconnid->stmthp, OCI_HTYPE_STMT);
    if (dbconnid->errhp != NULL) OCIHandleFree(dbconnid->errhp, OCI_HTYPE_ERROR);
    if (dbconnid->envhp != NULL) OCIHandleFree(dbconnid->envhp, OCI_HTYPE_ENV);
    free(dbconnid);
  }
  *fdbconnid = 0;
}
开发者ID:ARPA-SIMC,项目名称:libsim,代码行数:11,代码来源:oraclesim.c


示例16: OCIHandleFree

void OraSession::endSession() {
	sword status;

	status = OCIHandleFree((dvoid *)ociHandles.stmthp, (ub4)OCI_HTYPE_STMT);
	status = OCISessionEnd(ociHandles.svchp, ociHandles.errhp, ociHandles.usrhp, (ub4)OCI_DEFAULT);
	status = OCIServerDetach(ociHandles.srvhp, ociHandles.errhp, (ub4)OCI_DEFAULT );
	status = OCIHandleFree((dvoid *)ociHandles.srvhp, (ub4)OCI_HTYPE_SERVER);
	status = OCIHandleFree((dvoid *)ociHandles.svchp, (ub4)OCI_HTYPE_SVCCTX);
	status = OCIHandleFree((dvoid *)ociHandles.errhp, (ub4)OCI_HTYPE_ERROR);
	connectedUser = "";
}
开发者ID:Kangmo,项目名称:infinidb,代码行数:11,代码来源:orasession.cpp


示例17: oci8_svcctx_free

static void oci8_svcctx_free(oci8_base_t *base)
{
    oci8_svcctx_t *svcctx = (oci8_svcctx_t *)base;

    if (svcctx->authhp) {
        OCIHandleFree(svcctx->authhp, OCI_HTYPE_SESSION);
        svcctx->authhp = NULL;
    }
    if (svcctx->srvhp) {
        OCIHandleFree(svcctx->srvhp, OCI_HTYPE_SERVER);
        svcctx->srvhp = NULL;
    }
}
开发者ID:Vachman,项目名称:STMT,代码行数:13,代码来源:oci8.c


示例18: oracle_close_conn

static void oracle_close_conn(void *theconn)
{
    struct ora_conn *conn = (struct ora_conn*) theconn;

    gw_assert(conn != NULL);

    if (conn->svchp != NULL)
        oracle_checkerr(conn->errhp, OCILogoff(conn->svchp, conn->errhp));

    OCIHandleFree(conn->errhp, OCI_HTYPE_ERROR);
    OCIHandleFree(conn->envp, OCI_HTYPE_ENV);
    /* OCITerminate(OCI_DEFAULT); */

    gw_free(conn);
}
开发者ID:dimimpou,项目名称:gwlib,代码行数:15,代码来源:dbpool_oracle.c


示例19: while

int COracleDB::oracle_close( void )
{
	ORACLE_HANDLE* handle = ( ORACLE_HANDLE* ) _handle;

	if ( handle == NULL )
		return DB_ERR_SUCCESS;

	int status;
	if ( handle->svchp != NULL ) {
		while ( ( status = OCISessionEnd( handle->svchp, handle->errhp, handle->authp, OCI_DEFAULT ) )
				== OCI_STILL_EXECUTING ) {
			my_usleep();
		}
	}

	if ( handle->srvhp != NULL ) {
		while ( ( status = OCIServerDetach( handle->srvhp, handle->errhp, OCI_DEFAULT ) ) == OCI_STILL_EXECUTING ) {
			my_usleep();
		}
	}

	if ( handle->envhp != NULL ) {
		OCIHandleFree( ( dvoid * ) ( handle->envhp ), OCI_HTYPE_ENV );
	}

	if ( handle != NULL ) {
		delete handle;
		handle = NULL;
	}

	return 0;
}
开发者ID:caocf,项目名称:workspace-kepler,代码行数:32,代码来源:oracledb.cpp


示例20: ensure_func

static VALUE ensure_func(cb_arg_t *arg)
{
    if (arg->stmtp != NULL) {
        OCIHandleFree(arg->stmtp, OCI_HTYPE_STMT);
    }
    return Qnil;
}
开发者ID:josuecortes,项目名称:CheckinGT,代码行数:7,代码来源:oci8lib.c



注:本文中的OCIHandleFree函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ OCI_CHECK_PTR函数代码示例发布时间:2022-05-30
下一篇:
C++ OCIHandleAlloc函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap