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

📄 group__g__init.html

📁 oci的源码,可以在任何平台上编译,相当方便实用
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"><title>OCILIB (C Driver for Oracle): Initializing the library</title><link href="doxygen.css" rel="stylesheet" type="text/css"><link href="tabs.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.5.4 --><div class="tabs">  <ul>    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>    <li><a href="modules.html"><span>Modules</span></a></li>    <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>    <li><a href="files.html"><span>Files</span></a></li>  </ul></div><h1>Initializing the library</h1><hr><a name="_details"></a><h2>Detailed Description</h2>To use OCILIB, it first needs to be initialized through a call to <a class="el" href="group__g__init.html#gcdb642d75f7c8478e083634144bc813c" title="Initializes the library.">OCI_Initialize()</a>.<p>Then, the application connects to server, executes queries, ....<p>Finally, OCILIB resources must be released by <a class="el" href="group__g__init.html#g639706aa8e9689c7ebffc018fac6d3ae" title="Clean up all resources allocated by the library.">OCI_Cleanup()</a><p><dl class="note" compact><dt><b>Note:</b></dt><dd>The following objects are automatically freed by the library :<ul><li>Connections</li><li>Connection pools</li><li>Statements</li><li>Type info objects</li><li>Thread keys</li></ul></dd></dl><dl class="warning" compact><dt><b>Warning:</b></dt><dd>All other standalone object instances (mutexes, threads, dates, lobs, ...) <b>ARE NOT</b> freed.</dd></dl><dl class="user" compact><dt><b>Example</b></dt><dd><div class="fragment"><pre class="fragment"><span class="preprocessor">#include "ocilib.h"</span><span class="keywordtype">int</span> main(<span class="keywordtype">void</span>){    <span class="keywordflow">if</span> (!<a class="code" href="group__g__init.html#gcdb642d75f7c8478e083634144bc813c" title="Initializes the library.">OCI_Initialize</a>(NULL, NULL, OCI_ENV_DEFAULT))        <span class="keywordflow">return</span> EXIT_FAILURE;    <span class="comment">/* ... application code here ... */</span>    <a class="code" href="group__g__init.html#g639706aa8e9689c7ebffc018fac6d3ae" title="Clean up all resources allocated by the library.">OCI_Cleanup</a>();     <span class="keywordflow">return</span> EXIT_SUCCESS;}</pre></div> </dd></dl><p><table border="0" cellpadding="0" cellspacing="0"><tr><td></td></tr><tr><td colspan="2"><br><h2>Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">OCI_EXPORT boolean OCI_API&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__g__init.html#gcdb642d75f7c8478e083634144bc813c">OCI_Initialize</a> (POCI_ERROR err_handler, const mtext *home, unsigned int mode)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initializes the library.  <a href="#gcdb642d75f7c8478e083634144bc813c"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">OCI_EXPORT boolean OCI_API&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__g__init.html#g639706aa8e9689c7ebffc018fac6d3ae">OCI_Cleanup</a> (void)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Clean up all resources allocated by the library.  <a href="#g639706aa8e9689c7ebffc018fac6d3ae"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">OCI_EXPORT unsigned int OCI_API&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__g__init.html#g6fa5693d691752f93dbc6baf07e6cceb">OCI_GetOCICompileVersion</a> (void)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the major version of OCI used for compilation.  <a href="#g6fa5693d691752f93dbc6baf07e6cceb"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">OCI_EXPORT unsigned int OCI_API&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__g__init.html#g771bf5d33dbd0b63d84242819209b35b">OCI_GetOCIRuntimeVersion</a> (void)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the major version of OCI used for compilation.  <a href="#g771bf5d33dbd0b63d84242819209b35b"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">OCI_EXPORT unsigned int OCI_API&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__g__init.html#gecbebbd3747c5012dfbf072f90e33c77">OCI_GetImportMode</a> (void)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the Oracle shared library import mode.  <a href="#gecbebbd3747c5012dfbf072f90e33c77"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">OCI_EXPORT unsigned int OCI_API&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__g__init.html#gb6f4587e77cfa0f0696f1a676080b9d7">OCI_GetCharsetMetaData</a> (void)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the metadata charset type.  <a href="#gb6f4587e77cfa0f0696f1a676080b9d7"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">OCI_EXPORT unsigned int OCI_API&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__g__init.html#ge4f4cbad741ad0c35d9470708a3a0f15">OCI_GetCharsetUserData</a> (void)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the user data charset type.  <a href="#ge4f4cbad741ad0c35d9470708a3a0f15"></a><br></td></tr></table><hr><h2>Function Documentation</h2><a class="anchor" name="g639706aa8e9689c7ebffc018fac6d3ae"></a><!-- doxytag: member="ocilib.h::OCI_Cleanup" ref="g639706aa8e9689c7ebffc018fac6d3ae" args="(void)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">OCI_EXPORT boolean OCI_API OCI_Cleanup           </td>          <td>(</td>          <td class="paramtype">void&nbsp;</td>          <td class="paramname">          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"></td>        </tr>      </table></div><div class="memdoc"><p>Clean up all resources allocated by the library. <p><dl class="note" compact><dt><b>Note:</b></dt><dd>This function must be the last OCILIB library function call.</dd></dl><ul><li>It deallocates objects not explicitly freed by the program (connections, statements, ...)</li><li>It unloads the Oracle shared library</li></ul><p><dl class="return" compact><dt><b>Returns:</b></dt><dd>TRUE </dd></dl><p>Definition at line <a class="el" href="library_8c-source.html#l00930">930</a> of file <a class="el" href="library_8c-source.html">library.c</a>.</p></div></div><p><a class="anchor" name="gb6f4587e77cfa0f0696f1a676080b9d7"></a><!-- doxytag: member="ocilib.h::OCI_GetCharsetMetaData" ref="gb6f4587e77cfa0f0696f1a676080b9d7" args="(void)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">OCI_EXPORT unsigned int OCI_API OCI_GetCharsetMetaData           </td>          <td>(</td>          <td class="paramtype">void&nbsp;</td>          <td class="paramname">          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"></td>        </tr>      </table></div><div class="memdoc"><p>Return the metadata charset type. <p><dl class="note" compact><dt><b>Note:</b></dt><dd>Possible values are :</dd></dl><ul><li>OCI_CHAR_ANSI</li><li>OCI_CHAR_UNICODE </li></ul><p>Definition at line <a class="el" href="library_8c-source.html#l01065">1065</a> of file <a class="el" href="library_8c-source.html">library.c</a>.</p></div></div><p><a class="anchor" name="ge4f4cbad741ad0c35d9470708a3a0f15"></a><!-- doxytag: member="ocilib.h::OCI_GetCharsetUserData" ref="ge4f4cbad741ad0c35d9470708a3a0f15" args="(void)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">OCI_EXPORT unsigned int OCI_API OCI_GetCharsetUserData           </td>          <td>(</td>          <td class="paramtype">void&nbsp;</td>          <td class="paramname">          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"></td>        </tr>      </table></div><div class="memdoc"><p>Return the user data charset type. <p><dl class="note" compact><dt><b>Note:</b></dt><dd>Possible values are :</dd></dl><ul><li>OCI_CHAR_ANSI</li><li>OCI_CHAR_UNICODE </li></ul><p>Definition at line <a class="el" href="library_8c-source.html#l01074">1074</a> of file <a class="el" href="library_8c-source.html">library.c</a>.</p></div></div><p><a class="anchor" name="gecbebbd3747c5012dfbf072f90e33c77"></a><!-- doxytag: member="ocilib.h::OCI_GetImportMode" ref="gecbebbd3747c5012dfbf072f90e33c77" args="(void)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">OCI_EXPORT unsigned int OCI_API OCI_GetImportMode           </td>          <td>(</td>          <td class="paramtype">void&nbsp;</td>          <td class="paramname">          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"></td>        </tr>      </table></div><div class="memdoc"><p>Return the Oracle shared library import mode. <p><dl class="note" compact><dt><b>Note:</b></dt><dd>Possible values are:</dd></dl><ul><li>OCI_IMPORT_MODE_LINKAGE</li><li>OCI_IMPORT_MODE_RUNTIME </li></ul><p>Definition at line <a class="el" href="library_8c-source.html#l01056">1056</a> of file <a class="el" href="library_8c-source.html">library.c</a>.</p></div></div><p><a class="anchor" name="g6fa5693d691752f93dbc6baf07e6cceb"></a><!-- doxytag: member="ocilib.h::OCI_GetOCICompileVersion" ref="g6fa5693d691752f93dbc6baf07e6cceb" args="(void)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">OCI_EXPORT unsigned int OCI_API OCI_GetOCICompileVersion           </td>          <td>(</td>          <td class="paramtype">void&nbsp;</td>          <td class="paramname">          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"></td>        </tr>      </table></div><div class="memdoc"><p>Return the major version of OCI used for compilation. <p><dl class="note" compact><dt><b>Note:</b></dt><dd><ul><li>with linkage build option, the version is determined from the oci.h header through different ways</li><li>with runtime loading buid option, the version is set to the highest version of OCI needed by OCILIB, not necessarily the real OCI version </li></ul></dd></dl><p>Definition at line <a class="el" href="library_8c-source.html#l01038">1038</a> of file <a class="el" href="library_8c-source.html">library.c</a>.</p></div></div><p><a class="anchor" name="g771bf5d33dbd0b63d84242819209b35b"></a><!-- doxytag: member="ocilib.h::OCI_GetOCIRuntimeVersion" ref="g771bf5d33dbd0b63d84242819209b35b" args="(void)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">OCI_EXPORT unsigned int OCI_API OCI_GetOCIRuntimeVersion           </td>          <td>(</td>          <td class="paramtype">void&nbsp;</td>          <td class="paramname">          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"></td>        </tr>      </table></div><div class="memdoc"><p>Return the major version of OCI used for compilation. <p><dl class="note" compact><dt><b>Note:</b></dt><dd><ul><li>with linkage build option, the version is determined from the oci.h header through different ways</li><li>with runtime loading build option, the version determined from the symbols dynamically loaded. </li></ul></dd></dl><p>Definition at line <a class="el" href="library_8c-source.html#l01047">1047</a> of file <a class="el" href="library_8c-source.html">library.c</a>.</p><p>Referenced by <a class="el" href="group__g__connect.html#g6f61147801fce4b69edb4981ba4ea1b7">OCI_GetVersionConnection()</a>.</p></div></div><p><a class="anchor" name="gcdb642d75f7c8478e083634144bc813c"></a><!-- doxytag: member="ocilib.h::OCI_Initialize" ref="gcdb642d75f7c8478e083634144bc813c" args="(POCI_ERROR err_handler, const mtext *home, unsigned int mode)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">OCI_EXPORT boolean OCI_API OCI_Initialize           </td>          <td>(</td>          <td class="paramtype">POCI_ERROR&nbsp;</td>          <td class="paramname"> <em>err_handler</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">const mtext *&nbsp;</td>          <td class="paramname"> <em>home</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">unsigned int&nbsp;</td>          <td class="paramname"> <em>mode</em></td><td>&nbsp;</td>        </tr>        <tr>          <td></td>          <td>)</td>          <td></td><td></td><td width="100%"></td>        </tr>      </table></div><div class="memdoc"><p>Initializes the library. <p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>err_handler</em>&nbsp;</td><td>- Pointer to error handler procedure (optional) </td></tr>    <tr><td valign="top"></td><td valign="top"><em>home</em>&nbsp;</td><td>- Oracle home path (optional) </td></tr>    <tr><td valign="top"></td><td valign="top"><em>mode</em>&nbsp;</td><td>- Environment mode</td></tr>  </table></dl>Possible values for parameter mode:<p><ul><li>OCI_ENV_DEFAULT : default mode</li><li>OCI_ENV_THREADED : multithreading support</li><li>OCI_ENV_CONTEXT : thread contextual error handling</li></ul><p><dl class="note" compact><dt><b>Note:</b></dt><dd>This function must be called before any OCILIB library function.</dd></dl><ul><li>It installs the error handler</li><li>It loads the Oracle shared library located in the path pointed by 'home'</li></ul><p><dl class="warning" compact><dt><b>Warning:</b></dt><dd>If the parameter 'home' is NULL, the Oracle library is loaded from system environment variables</dd></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>TRUE on success otherwise FALSE (only with Oracle runtime loading mode if the oracle shared libraries can't be loaded) </dd></dl><p>Definition at line <a class="el" href="library_8c-source.html#l00303">303</a> of file <a class="el" href="library_8c-source.html">library.c</a>.</p></div></div><p><hr size="1"><address style="text-align: right;"><small>Generated on Sat Apr 18 01:13:12 2009 for OCILIB (C Driver for Oracle) by&nbsp;<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.4 </small></address></body></html>

⌨️ 快捷键说明

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