⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 group__loginout.html

📁 Linux下的操作oracle数据库的连接库
💻 HTML
📖 第 1 页 / 共 4 页
字号:
        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td></td>          <td class="md" nowrap>const char *&nbsp;</td>          <td class="mdname" nowrap> <em>tnsname</em></td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Attach to a database server. <p>Attaches to a database without creating a session. tnsname can be a database name or a connect string. The function extracts the database name. If no database name is supplied, the function attaches to the database given in the env. variable ORACLE_SID.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign=top><em>dbhp</em>&nbsp;</td><td>O - The database handle </td></tr>    <tr><td valign=top><em>tnsname</em>&nbsp;</td><td>O - The tnsname or the complete Oracle connect string.</td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd><ul><li>SQLO_SUCCESS </li><li>&lt; 0 on error </li></ul></dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__loginout.html#ga4">sqlo_session_begin</a>, <a class="el" href="group__loginout.html#ga5">sqlo_server_detach</a> </dd></dl><dl compact><dt><b>Since:</b></dt><dd>Version 2.2 </dd></dl><p>Definition at line <a class="el" href="sqlora_8c-source.html#l05831">5831</a> of file <a class="el" href="sqlora_8c-source.html">sqlora.c</a>.<p>References <a class="el" href="sqlora_8c-source.html#l01680">_db_add()</a>, <a class="el" href="sqlora_8c-source.html#l01761">_db_release()</a>, <a class="el" href="sqlora_8c-source.html#l01297">_env_lock()</a>, <a class="el" href="sqlora_8c-source.html#l01317">_env_unlock()</a>, <a class="el" href="sqlora_8c-source.html#l04319">_get_trace_fp()</a>, <a class="el" href="sqlora_8c.html#a47">_oci_init_mode</a>, <a class="el" href="sqlora_8c-source.html#l00507">_sqlo_db_struct::attached</a>, <a class="el" href="sqlora_8c-source.html#l00487">_sqlo_db_struct::authp</a>, <a class="el" href="sqlora_8c-source.html#l00389">CHECK_OCI_STATUS</a>, <a class="el" href="sqlora_8c-source.html#l00478">_sqlo_db_struct::dbh</a>, <a class="el" href="sqlora_8c-source.html#l00489">_sqlo_db_struct::envhp</a>, <a class="el" href="sqlora_8c-source.html#l00483">_sqlo_db_struct::errhp</a>, <a class="el" href="sqlora_8c-source.html#l00495">_sqlo_db_struct::errmsg</a>, <a class="el" href="sqlora_8c-source.html#l00146">EXEC_WHEN_THREADING</a>, <a class="el" href="sqlora_8c.html#a30">sqlo_db_struct_ptr_t</a>, <a class="el" href="group__constants.html#gga3a26">SQLO_ERROR</a>, <a class="el" href="sqlora_8c-source.html#l05764">sqlo_split_cstring()</a>, <a class="el" href="group__constants.html#gga3a25">SQLO_SUCCESS</a>, <a class="el" href="sqlora_8c-source.html#l00481">_sqlo_db_struct::srvhp</a>, <a class="el" href="sqlora_8c-source.html#l00493">_sqlo_db_struct::status</a>, <a class="el" href="sqlora_8c-source.html#l01021">strdup()</a>, <a class="el" href="sqlora_8c-source.html#l00485">_sqlo_db_struct::svchp</a>, <a class="el" href="sqlora_8c-source.html#l00491">_sqlo_db_struct::tnsname</a>, <a class="el" href="sqlora_8c-source.html#l00238">TRACE</a>, <a class="el" href="sqlora_8c-source.html#l00218">TRUE</a>, and <a class="el" href="sqlora_8c-source.html#l00506">_sqlo_db_struct::used</a>.<p>Referenced by <a class="el" href="sqlora_8c-source.html#l06271">sqlo_connect()</a>.    </td>  </tr></table><p>Here is the call graph for this function:<p><center><img src="group__loginout_ga3_cgraph.png" border="0" usemap="#group__loginout_ga3_cgraph_map" alt=""></center><map name="group__loginout_ga3_cgraph_map"><area href="sqlora_8c.html#a112" shape="rect" coords="215,133,281,151" alt=""><area href="sqlora_8c.html#a113" shape="rect" coords="204,279,292,298" alt=""><area href="sqlora_8c.html#a128" shape="rect" coords="388,346,484,365" alt=""><area href="sqlora_8c.html#a85" shape="rect" coords="211,393,285,411" alt=""><area href="sqlora_8c.html#a86" shape="rect" coords="204,435,292,454" alt=""><area href="group__loginout.html#ga2" shape="rect" coords="192,478,304,497" alt=""><area href="sqlora_8c.html#a146" shape="rect" coords="224,521,272,539" alt=""><area href="sqlora_8c.html#a142" shape="rect" coords="400,90,472,109" alt=""><area href="sqlora_8c.html#a83" shape="rect" coords="399,175,473,194" alt=""><area href="sqlora_8c.html#a84" shape="rect" coords="392,218,480,237" alt=""><area href="sqlora_8c.html#a141" shape="rect" coords="365,133,507,151" alt=""><area href="sqlora_8c.html#a130" shape="rect" coords="384,5,488,23" alt=""><area href="sqlora_8c.html#a143" shape="rect" coords="393,47,479,66" alt=""><area href="sqlora_8c.html#a148" shape="rect" coords="575,285,663,303" alt=""><area href="sqlora_8c.html#a149" shape="rect" coords="568,331,669,350" alt=""><area href="sqlora_8c.html#a100" shape="rect" coords="353,261,519,279" alt=""><area href="sqlora_8c.html#a103" shape="rect" coords="388,303,484,322" alt=""></map><a class="anchor" name="ga5" doxytag="sqlora.h::sqlo_server_detach" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> int sqlo_server_detach </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="group__typedefs.html#ga0">sqlo_db_handle_t</a>&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>dbh</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Detach from server. <p>Closes all open sessions and detaches from the server.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign=top><em>dbh</em>&nbsp;</td><td>I - A database handle</td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd><ul><li>SQLO_SUCCESS </li><li>&lt; 0 on error </li></ul></dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__loginout.html#ga3">sqlo_server_attach</a> </dd></dl><dl compact><dt><b>Since:</b></dt><dd>Version 2.2 </dd></dl><p>Definition at line <a class="el" href="sqlora_8c-source.html#l06147">6147</a> of file <a class="el" href="sqlora_8c-source.html">sqlora.c</a>.<p>References <a class="el" href="sqlora_8c-source.html#l01761">_db_release()</a>, <a class="el" href="sqlora_8c.html#a49">_dbv</a>, <a class="el" href="sqlora_8c-source.html#l04319">_get_trace_fp()</a>, <a class="el" href="sqlora_8c-source.html#l00865">_trace_fp</a>, <a class="el" href="sqlora_8c-source.html#l00507">_sqlo_db_struct::attached</a>, <a class="el" href="sqlora_8c-source.html#l00389">CHECK_OCI_STATUS</a>, <a class="el" href="sqlora_8c-source.html#l00416">CHECK_OCI_STATUS_RETURN</a>, <a class="el" href="sqlora_8c-source.html#l00483">_sqlo_db_struct::errhp</a>, <a class="el" href="sqlora_8c-source.html#l00508">_sqlo_db_struct::session_created</a>, <a class="el" href="sqlora_8h-source.html#l00309">sqlo_db_handle_t</a>, <a class="el" href="sqlora_8c.html#a30">sqlo_db_struct_ptr_t</a>, <a class="el" href="group__constants.html#gga4a34">SQLO_INVALID_DB_HANDLE</a>, <a class="el" href="sqlora_8c-source.html#l06221">sqlo_session_end()</a>, <a class="el" href="group__constants.html#gga3a25">SQLO_SUCCESS</a>, <a class="el" href="sqlora_8c-source.html#l00481">_sqlo_db_struct::srvhp</a>, <a class="el" href="sqlora_8c-source.html#l00493">_sqlo_db_struct::status</a>, <a class="el" href="sqlora_8c-source.html#l00238">TRACE</a>, <a class="el" href="sqlora_8c-source.html#l00506">_sqlo_db_struct::used</a>, and <a class="el" href="sqlora_8c-source.html#l00435">VALID_DBH_RANGE</a>.<p>Referenced by <a class="el" href="sqlora_8c-source.html#l06318">sqlo_finish()</a>.    </td>  </tr></table><p>Here is the call graph for this function:<p><center><img src="group__loginout_ga5_cgraph.png" border="0" usemap="#group__loginout_ga5_cgraph_map" alt=""></center><map name="group__loginout_ga5_cgraph_map"><area href="sqlora_8c.html#a113" shape="rect" coords="211,100,299,119" alt=""><area href="sqlora_8c.html#a128" shape="rect" coords="396,176,492,195" alt=""><area href="group__loginout.html#ga7" shape="rect" coords="196,201,313,220" alt=""><area href="sqlora_8c.html#a100" shape="rect" coords="361,5,527,24" alt=""><area href="sqlora_8c.html#a83" shape="rect" coords="407,48,481,67" alt=""><area href="sqlora_8c.html#a84" shape="rect" coords="400,91,488,109" alt=""><area href="sqlora_8c.html#a103" shape="rect" coords="396,133,492,152" alt=""><area href="sqlora_8c.html#a126" shape="rect" coords="371,219,517,237" alt=""></map><a class="anchor" name="ga6" doxytag="sqlora.h::sqlo_server_free" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> int sqlo_server_free </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="group__typedefs.html#ga0">sqlo_db_handle_t</a>&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>dbh</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Free a server connection This is your emergency exit when a connection to a database gets lost (end of file on communication channel). <p>You cannot free the libsqlora8 resources in such a case by sqlo_session_end or sqlo_server_detach, because the OCI statement OCISessionEnd crashes :-( So, if you detect that a connection is broken and you want to clean up the situation and reconnect, call sqlo_server_free to detach from the server and savely free the resources allocated by libsqlora8<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign=top><em>dbh</em>&nbsp;</td><td>I - A database handle</td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd><ul><li>SQLO_SUCCESS </li><li>&lt; 0 on error </li></ul></dd></dl><dl compact><dt><b>Since:</b></dt><dd>Version 2.3 </dd></dl><p>Definition at line <a class="el" href="sqlora_8c-source.html#l06196">6196</a> of file <a class="el" href="sqlora_8c-source.html">sqlora.c</a>.<p>References <a class="el" href="sqlora_8c-source.html#l01761">_db_release()</a>, <a class="el" href="sqlora_8c-source.html#l04319">_get_trace_fp()</a>, <a class="el" href="sqlora_8c-source.html#l00507">_sqlo_db_struct::attached</a>, <a class="el" href="sqlora_8c-source.html#l00340">CHECK_DBHANDLE</a>, <a class="el" href="sqlora_8c-source.html#l00483">_sqlo_db_struct::errhp</a>, <a class="el" href="sqlora_8h-source.html#l00309">sqlo_db_handle_t</a>, <a class="el" href="sqlora_8c.html#a30">sqlo_db_struct_ptr_t</a>, <a class="el" href="group__constants.html#gga4a34">SQLO_INVALID_DB_HANDLE</a>, <a class="el" href="sqlora_8c-source.html#l00481">_sqlo_db_struct::srvhp</a>, <a class="el" href="sqlora_8c-source.html#l00493">_sqlo_db_struct::status</a>, and <a class="el" href="sqlora_8c-source.html#l00238">TRACE</a>.<p>Referenced by <a class="el" href="sqlora_8c-source.html#l06271">sqlo_connect()</a>, and <a class="el" href="sqlora_8c-source.html#l06318">sqlo_finish()</a>.    </td>  </tr></table><p>Here is the call graph for this function:<p><center><img src="group__loginout_ga6_cgraph.png" border="0" usemap="#group__loginout_ga6_cgraph_map" alt=""></center><map name="group__loginout_ga6_cgraph_map"><area href="sqlora_8c.html#a113" shape="rect" coords="179,101,267,120" alt=""><area href="sqlora_8c.html#a128" shape="rect" coords="351,176,447,194" alt=""><area href="sqlora_8c.html#a100" shape="rect" coords="316,5,481,24" alt=""><area href="sqlora_8c.html#a83" shape="rect" coords="361,48,436,66" alt=""><area href="sqlora_8c.html#a84" shape="rect" coords="355,90,443,109" alt=""><area href="sqlora_8c.html#a103" shape="rect" coords="351,133,447,152" alt=""><area href="sqlora_8c.html#a148" shape="rect" coords="537,48,625,66" alt=""><area href="sqlora_8c.html#a149" shape="rect" coords="531,90,632,109" alt=""></map><a class="anchor" name="ga4" doxytag="sqlora.h::sqlo_session_begin" ></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> int sqlo_session_begin </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="group__typedefs.html#ga0">sqlo_db_handle_t</a>&nbsp;</td>          <td class="mdname" nowrap> <em>dbh</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td></td>          <td class="md" nowrap>const char *&nbsp;</td>          <td class="mdname" nowrap> <em>username</em>, </td>        </tr>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -