📄 ex6_8c-example.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>libsqlora8: Example Documentation</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.3.6 --><div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a> | <a class="qindex" href="examples.html">Examples</a></div><h1>ex6.c</h1>Example for using sqlo_reopen <div class="fragment"><pre><span class="comment">/* $Id: ex6.c,v 1.5 2002/08/24 12:54:47 kpoitschke Exp $ */</span><span class="preprocessor">#include <stdio.h></span><span class="preprocessor">#include <stdlib.h></span><span class="preprocessor">#include "examples.h"</span><a class="code" href="group__typedefs.html#ga1">sqlo_stmt_handle_t</a> reopen_cursor(<a class="code" href="group__typedefs.html#ga0">sqlo_db_handle_t</a> dbh, <span class="keywordtype">double</span> min_income){ <span class="keyword">static</span> <a class="code" href="group__typedefs.html#ga1">sqlo_stmt_handle_t</a> sth = <a class="code" href="group__constants.html#gga5a49">SQLO_STH_INIT</a>; <span class="keywordtype">int</span> argc = 0; <span class="keyword">const</span> <span class="keywordtype">char</span> * argv[1]; <span class="keywordtype">char</span> hlp[64]; sprintf(hlp, <span class="stringliteral">"%f"</span>, min_income); argv[argc++] = hlp; <span class="keywordflow">if</span> (<a class="code" href="group__constants.html#gga5a49">SQLO_STH_INIT</a> == sth) { <span class="comment">/* first time, open a new cursor */</span> <span class="keywordflow">if</span> ( 0 > (<a name="a71"></a><a class="code" href="group__easy.html#ga165">sqlo_open2</a>(&sth, dbh, <span class="stringliteral">"SELECT ENAME, SAL FROM EMP WHERE SAL >= :1"</span>, argc, argv))) { error_exit(dbh, <span class="stringliteral">"sqlo_open"</span>); } } <span class="keywordflow">else</span> { <span class="comment">/* next time, bind again with new variables */</span> <span class="keywordflow">if</span> ( 0 > <a name="a72"></a><a class="code" href="group__easy.html#ga166">sqlo_reopen</a>(sth, argc, argv)) error_exit(dbh, <span class="stringliteral">"sqlo_reopen"</span>); } <span class="keywordflow">return</span> sth;}<span class="comment">/* $Id: ex6.c,v 1.5 2002/08/24 12:54:47 kpoitschke Exp $ */</span></pre></div> <hr size="1"><address style="align: right;"><small>Generated on Sun Jun 13 04:51:41 2004 for libsqlora8 by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 > </a>1.3.6 </small></address></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -