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

📄 group__easy.html

📁 Linux下的操作oracle数据库的连接库
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<p>Tests if a value exists in a table. <p>Tests if a record exists in a table where field = value [AND where].<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>    <tr><td valign=top><em>table</em>&nbsp;</td><td>I - A table name </td></tr>    <tr><td valign=top><em>colname</em>&nbsp;</td><td>I - A column name </td></tr>    <tr><td valign=top><em>colval</em>&nbsp;</td><td>I - A column value </td></tr>    <tr><td valign=top><em>where</em>&nbsp;</td><td>I - More conditions (optional)</td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd><ul><li>SQLO_SUCCESS </li><li>SQLO_NO_DATA </li><li>&lt; 0 on error. </li></ul></dd></dl><dl compact><dt><b>Example:</b></dt><dd><div class="fragment"><pre><span class="comment">/* $Id: ex1.c,v 1.4 2002/08/24 12:54:47 kpoitschke Exp $ */</span><span class="preprocessor">#include &lt;stdio.h&gt;</span><span class="preprocessor">#include &lt;stdlib.h&gt;</span><span class="preprocessor">#include "examples.h"</span><span class="keywordtype">int</span> table_exists(<a class="code" href="group__typedefs.html#ga0">sqlo_db_handle_t</a> dbh, <span class="keywordtype">char</span> * table_name){  <span class="keywordtype">int</span> stat;  <span class="keywordflow">if</span> ( 0 &gt; (stat = <a class="code" href="group__easy.html#ga160">sqlo_exists</a>(dbh, <span class="stringliteral">"USER_TABLES"</span>, <span class="stringliteral">"TABLE_NAME"</span>, table_name, NULL))) {    error_exit(dbh, <span class="stringliteral">"sqlo_exists"</span>);   }   <span class="keywordflow">return</span> stat == <a class="code" href="group__constants.html#gga3a25">SQLO_SUCCESS</a> ? 1 : 0; }<span class="comment">/* $Id: ex1.c,v 1.4 2002/08/24 12:54:47 kpoitschke Exp $ */</span></pre></div> </dd></dl><p>Definition at line <a class="el" href="sqlora_8c-source.html#l04822">4822</a> of file <a class="el" href="sqlora_8c-source.html">sqlora.c</a>.<p>References <a class="el" href="sqlora_8c-source.html#l04319">_get_trace_fp()</a>, <a class="el" href="sqlora_8c-source.html#l00340">CHECK_DBHANDLE</a>, <a class="el" href="sqlora_8c-source.html#l00416">CHECK_OCI_STATUS_RETURN</a>, <a class="el" href="sqlora_8c-source.html#l00495">_sqlo_db_struct::errmsg</a>, <a class="el" href="sqlora_8c-source.html#l05656">sqlo_close()</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#l05367">sqlo_fetch()</a>, <a class="el" href="group__constants.html#gga4a34">SQLO_INVALID_DB_HANDLE</a>, <a class="el" href="group__constants.html#gga3a32">SQLO_NO_DATA</a>, <a class="el" href="sqlora_8c-source.html#l05238">sqlo_open2()</a>, <a class="el" href="group__constants.html#gga5a49">SQLO_STH_INIT</a>, <a class="el" href="group__constants.html#gga3a28">SQLO_STILL_EXECUTING</a>, <a class="el" href="sqlora_8h-source.html#l00318">sqlo_stmt_handle_t</a>, <a class="el" href="group__constants.html#gga3a25">SQLO_SUCCESS</a>, and <a class="el" href="sqlora_8c-source.html#l00238">TRACE</a>.    </td>  </tr></table><p>Here is the call graph for this function:<p><center><img src="group__easy_ga0_cgraph.png" border="0" usemap="#group__easy_ga0_cgraph_map" alt=""></center><map name="group__easy_ga0_cgraph_map"><area href="sqlora_8c.html#a128" shape="rect" coords="632,344,728,362" alt=""><area href="group__easy.html#ga14" shape="rect" coords="481,666,556,685" alt=""><area href="group__easy.html#ga6" shape="rect" coords="307,620,379,638" alt=""><area href="group__easy.html#ga4" shape="rect" coords="144,461,224,480" alt=""><area href="sqlora_8c.html#a104" shape="rect" coords="631,620,729,638" alt=""><area href="sqlora_8c.html#a120" shape="rect" coords="625,713,735,732" alt=""><area href="sqlora_8c.html#a110" shape="rect" coords="639,806,721,825" alt=""><area href="sqlora_8c.html#a109" shape="rect" coords="633,530,727,549" alt=""><area href="sqlora_8c.html#a103" shape="rect" coords="632,390,728,409" alt=""><area href="sqlora_8c.html#a107" shape="rect" coords="483,810,555,829" alt=""><area href="sqlora_8c.html#a91" shape="rect" coords="461,573,576,592" alt=""><area href="sqlora_8c.html#a152" shape="rect" coords="273,289,412,308" alt=""><area href="sqlora_8c.html#a108" shape="rect" coords="311,376,375,394" alt=""><area href="sqlora_8c.html#a129" shape="rect" coords="309,461,376,480" alt=""><area href="sqlora_8c.html#a119" shape="rect" coords="279,418,407,437" alt=""><area href="sqlora_8c.html#a133" shape="rect" coords="296,526,389,545" alt=""><area href="sqlora_8c.html#a102" shape="rect" coords="304,128,381,146" alt=""><area href="sqlora_8c.html#a153" shape="rect" coords="467,437,571,456" alt=""><area href="sqlora_8c.html#a92" shape="rect" coords="479,480,559,498" alt=""><area href="sqlora_8c.html#a97" shape="rect" coords="468,344,569,362" alt=""><area href="sqlora_8c.html#a101" shape="rect" coords="472,149,565,168" alt=""><area href="sqlora_8c.html#a105" shape="rect" coords="484,106,553,125" alt=""></map><a class="anchor" name="ga6" doxytag="sqlora.h::sqlo_fetch" ></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_fetch </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="group__typedefs.html#ga1">sqlo_stmt_handle_t</a>&nbsp;</td>          <td class="mdname" nowrap> <em>sth</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td></td>          <td class="md" nowrap>unsigned int&nbsp;</td>          <td class="mdname" nowrap> <em>nrows</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>Fetches the data from an open cursor. <p>This functions fetches data from an open cursor, if the sql was a query. For non-queries, the statement is executed. Use <a class="el" href="group__easy.html#ga7">sqlo_values</a> to get the data. <dl compact><dt><b>Attention:</b></dt><dd>nrows must be 1 for cursors opened with <a class="el" href="group__easy.html#ga3">sqlo_open</a> or <a class="el" href="group__easy.html#ga4">sqlo_open2</a>. For cursors where the output variables were defined manually with <a class="el" href="group__complex.html#ga5">sqlo_define_by_pos</a>, this can be for example the size of the array in which you are fetching.</dd></dl><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign=top><em>sth</em>&nbsp;</td><td>I - A statement handle </td></tr>    <tr><td valign=top><em>nrows</em>&nbsp;</td><td>I - The number of rows to fetch.</td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd><ul><li>SQLO_SUCCESS </li><li>SQLO_NO_DATA </li><li>&lt; 0 on error </li></ul></dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__easy.html#ga4">sqlo_open2</a>, <a class="el" href="group__easy.html#ga7">sqlo_values</a>, <a class="el" href="group__easy.html#ga14">sqlo_close</a> </dd></dl><p>Definition at line <a class="el" href="sqlora_8c-source.html#l05367">5367</a> of file <a class="el" href="sqlora_8c-source.html">sqlora.c</a>.<p>References <a class="el" href="sqlora_8c-source.html#l01496">_get_stmt_string()</a>, <a class="el" href="sqlora_8c-source.html#l04319">_get_trace_fp()</a>, <a class="el" href="sqlora_8c-source.html#l02746">_is_query()</a>, <a class="el" href="sqlora_8c-source.html#l02518">_save_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#l00367">CHECK_STHANDLE</a>, <a class="el" href="sqlora_8c-source.html#l00565">_sqlo_stmt_struct::dbp</a>, <a class="el" href="sqlora_8c-source.html#l00483">_sqlo_db_struct::errhp</a>, <a class="el" href="sqlora_8c-source.html#l00223">FALSE</a>, <a class="el" href="sqlora_8c.html#a30">sqlo_db_struct_ptr_t</a>, <a class="el" href="group__constants.html#gga4a36">SQLO_INVALID_STMT_HANDLE</a>, <a class="el" href="group__constants.html#gga3a28">SQLO_STILL_EXECUTING</a>, <a class="el" href="sqlora_8c.html#a35">sqlo_stmt_struct_ptr_t</a>, <a class="el" href="sqlora_8c-source.html#l00493">_sqlo_db_struct::status</a>, <a class="el" href="sqlora_8c-source.html#l00562">_sqlo_stmt_struct::sth</a>, <a class="el" href="sqlora_8c-source.html#l00622">_sqlo_stmt_struct::still_executing</a>, <a class="el" href="sqlora_8c-source.html#l00567">_sqlo_stmt_struct::stmthp</a>, <a class="el" href="sqlora_8c-source.html#l00485">_sqlo_db_struct::svchp</a>, <a class="el" href="sqlora_8c-source.html#l00238">TRACE</a>, and <a class="el" href="sqlora_8c-source.html#l00218">TRUE</a>.<p>Referenced by <a class="el" href="sqlora_8c-source.html#l04902">sqlo_count()</a>, <a class="el" href="sqlora_8c-source.html#l04822">sqlo_exists()</a>, and <a class="el" href="sqlora_8c-source.html#l04991">sqlo_run()</a>.    </td>  </tr></table><p>Here is the call graph for this function:<p><center><img src="group__easy_ga6_cgraph.png" border="0" usemap="#group__easy_ga6_cgraph_map" alt=""></center><map name="group__easy_ga6_cgraph_map"><area href="sqlora_8c.html#a120" shape="rect" coords="141,5,251,23" alt=""><area href="sqlora_8c.html#a128" shape="rect" coords="303,97,399,115" alt=""><area href="sqlora_8c.html#a107" shape="rect" coords="160,98,232,117" alt=""><area href="sqlora_8c.html#a91" shape="rect" coords="139,141,253,159" alt=""></map><a class="anchor" name="ga16" doxytag="sqlora.h::sqlo_isopen" ></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_isopen </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="group__typedefs.html#ga1">sqlo_stmt_handle_t</a>&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>sth</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>Test if a cursor is open. <p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign=top><em>sth</em>&nbsp;</td><td>I - A statement handle.</td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd><ul><li>SQLO_SUCCESS if the cursor is open </li><li>1 if not (unused sth) </li><li>SQLO_INVALID_STMT_HANDLE. </li></ul></dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__easy.html#ga4">sqlo_open2</a> </dd></dl><p>Definition at line <a class="el" href="sqlora_8c-source.html#l06418">6418</a> of file <a class="el" href="sqlora_8c-source.html">sqlora.c</a>.<p>References <a class="el" href="sqlora_8c-source.html#l02805">_is_opened()</a>, <a class="el" href="sqlora_8c-source.html#l00367">CHECK_STHANDLE</a>, <a class="el" href="group__constants.html#gga4a36">SQLO_INVALID_STMT_HANDLE</a>, <a class="el" href="sqlora_8h-source.html#l00318">sqlo_stmt_handle_t</a>, <a class="el" href="sqlora_8c.html#a35">sqlo_stmt_struct_ptr_t</a>, and <a class="el" href="group__constants.html#gga3a25">SQLO_SUCCESS</a>.    </td>  </tr></table><p>Here is the call graph for this function:<p><center><img src="group__easy_ga16_cgraph.png" border="0" usemap="#group__easy_ga16_cgraph_map" alt=""></center><map name="group__easy_ga16_cgraph_map"><area href="sqlora_8c.html#a110" shape="rect" coords="148,5,231,23" alt=""></map><a class="anchor" name="ga12" doxytag="sqlora.h::sqlo_ncols" ></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_ncols </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="group__typedefs.html#ga1">sqlo_stmt_handle_t</a>&nbsp;</td>          <td class="mdname" nowrap> <em>sth</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td></td>          <td class="md" nowrap>int&nbsp;</td>

⌨️ 快捷键说明

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