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

📄 group__complex.html

📁 Linux下的操作oracle数据库的连接库
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<area href="sqlora_8c.html#a128" shape="rect" coords="388,29,484,48" alt=""><area href="sqlora_8c.html#a111" shape="rect" coords="205,98,336,117" alt=""><area href="sqlora_8c.html#a109" shape="rect" coords="224,141,317,160" alt=""><area href="group__complex.html#ga2" shape="rect" coords="203,184,339,202" alt=""></map><a class="anchor" name="ga3" doxytag="sqlora.h::sqlo_bind_by_pos" ></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_bind_by_pos </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>          <td class="mdname" nowrap> <em>position</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td></td>          <td class="md" nowrap>int&nbsp;</td>          <td class="mdname" nowrap> <em>param_type</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td></td>          <td class="md" nowrap>const void *&nbsp;</td>          <td class="mdname" nowrap> <em>param_addr</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>param_size</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td></td>          <td class="md" nowrap>short *&nbsp;</td>          <td class="mdname" nowrap> <em>ind_addr</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td></td>          <td class="md" nowrap>int&nbsp;</td>          <td class="mdname" nowrap> <em>is_array</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>Bind a variable by position. <p>If is_array is 1, the parameters param_addr and ind_addr must point to arrays. ind_addr is optional and can be passed a NULL. The param_size is still the size of one array element, not the whole array size!<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 - The statement handle </td></tr>    <tr><td valign=top><em>position</em>&nbsp;</td><td>I - The bind parameter position in the string. Starts with 1 for the first. </td></tr>    <tr><td valign=top><em>param_type</em>&nbsp;</td><td>I - The datatype of the bind parameter (see <a class="el" href="group__constants.html#ga6">sqlo_data_types</a>). </td></tr>    <tr><td valign=top><em>param_addr</em>&nbsp;</td><td>I - The pointer to the parameter data. </td></tr>    <tr><td valign=top><em>param_size</em>&nbsp;</td><td>I - The size of the object at param_addr in bytes. </td></tr>    <tr><td valign=top><em>ind_addr</em>&nbsp;</td><td>I - The pointer to the NULL indicator variable (optional). </td></tr>    <tr><td valign=top><em>is_array</em>&nbsp;</td><td>I - 1 means param_addr points to an array, 0 means a single variable.</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>Example:</b></dt><dd><div class="fragment"><pre><span class="comment">/* $Id: ex10.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><a class="code" href="group__typedefs.html#ga1">sqlo_stmt_handle_t</a> prepare_cursor(<a class="code" href="group__typedefs.html#ga0">sqlo_db_handle_t</a> dbh, <span class="keywordtype">double</span> * min_salary){  <a class="code" href="group__typedefs.html#ga1">sqlo_stmt_handle_t</a> sth;                      <span class="comment">/* statement handle */</span>  <span class="keywordflow">if</span> (0 &gt; (sth = <a class="code" href="group__complex.html#ga186">sqlo_prepare</a>(dbh,                             <span class="stringliteral">"SELECT ENAME, SAL FROM EMP WHERE SAL &gt;= :salary ORDER BY 2,1"</span>)))    error_exit(dbh, <span class="stringliteral">"sqlo_prepare"</span>);  <span class="keywordflow">if</span> (<a class="code" href="group__constants.html#gga3a25">SQLO_SUCCESS</a> !=       <a class="code" href="group__complex.html#ga190">sqlo_bind_by_pos</a>(sth, 1, SQLOT_FLT, min_salary, <span class="keyword">sizeof</span>(<span class="keywordtype">double</span>), 0, 0))    error_exit(dbh, <span class="stringliteral">"sqlo_bind_by_pos"</span>);  <span class="keywordflow">return</span> sth;}<span class="comment">/* $Id: ex10.c,v 1.4 2002/08/24 12:54:47 kpoitschke Exp $ */</span></pre></div> </dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__complex.html#ga0">sqlo_prepare</a>, <a class="el" href="group__complex.html#ga1">sqlo_bind_by_name</a>, <a class="el" href="group__complex.html#ga5">sqlo_define_by_pos</a> </dd></dl><p>Definition at line <a class="el" href="sqlora_8c-source.html#l06715">6715</a> of file <a class="el" href="sqlora_8c-source.html">sqlora.c</a>.<p>References <a class="el" href="sqlora_8c-source.html#l02943">_bind_by_pos()</a>, <a class="el" href="sqlora_8c-source.html#l02822">_get_data_type_str()</a>, <a class="el" href="sqlora_8c-source.html#l04319">_get_trace_fp()</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="group__constants.html#gga4a36">SQLO_INVALID_STMT_HANDLE</a>, <a class="el" href="sqlora_8c.html#a35">sqlo_stmt_struct_ptr_t</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__complex_ga3_cgraph.png" border="0" usemap="#group__complex_ga3_cgraph_map" alt=""></center><map name="group__complex_ga3_cgraph_map"><area href="sqlora_8c.html#a93" shape="rect" coords="188,91,287,110" alt=""><area href="sqlora_8c.html#a128" shape="rect" coords="513,51,609,70" alt=""><area href="sqlora_8c.html#a111" shape="rect" coords="335,141,465,159" alt=""><area href="sqlora_8c.html#a124" shape="rect" coords="356,5,444,23" alt=""><area href="sqlora_8c.html#a109" shape="rect" coords="353,98,447,117" alt=""></map><a class="anchor" name="ga4" doxytag="sqlora.h::sqlo_bind_by_pos2" ></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_bind_by_pos2 </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>          <td class="mdname" nowrap> <em>position</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td></td>          <td class="md" nowrap>int&nbsp;</td>          <td class="mdname" nowrap> <em>param_type</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td></td>          <td class="md" nowrap>const void *&nbsp;</td>          <td class="mdname" nowrap> <em>param_addr</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>param_size</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td></td>          <td class="md" nowrap>short *&nbsp;</td>          <td class="mdname" nowrap> <em>ind_addr</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td></td>          <td class="md" nowrap>unsigned short *&nbsp;</td>          <td class="mdname" nowrap> <em>rcode_addr</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>skip_size</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>Bind a variable by position. <p>Bind the input variables. This new version supports arrays of structures. Set the skip_size to the size of the structure. rcode and ind must be part of the structure.<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 - The statement handle </td></tr>    <tr><td valign=top><em>position</em>&nbsp;</td><td>I - The bind parameter position in the string. Starts with 1 for the first. </td></tr>    <tr><td valign=top><em>param_type</em>&nbsp;</td><td>I - The datatype of the bind parameter (<a class="el" href="group__constants.html#ga6">sqlo_data_types</a>). </td></tr>    <tr><td valign=top><em>param_addr</em>&nbsp;</td><td>I - The pointer to the parameter data. </td></tr>    <tr><td valign=top><em>param_size</em>&nbsp;</td><td>I - The size of the object at param_addr in bytes. </td></tr>    <tr><td valign=top><em>ind_addr</em>&nbsp;</td><td>I - The pointer to the NULL indicator variable (optional). </td></tr>    <tr><td valign=top><em>rcode_addr</em>&nbsp;</td><td>I - The pointer to the variable that should return the column level </td></tr>    <tr><td valign=top><em>skip_size</em>&nbsp;</td><td>I - In case into an array of structures, set to sizeof(your_struct), otherwise set it to 0.</td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd><ul><li>SQLO_SUCCESS </li><li>&lt; 0 on error </li></ul>

⌨️ 快捷键说明

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