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

📄 classodbc_1_1_callable_statement.html.svn-base

📁 絲路server源碼 Silk Road server source
💻 SVN-BASE
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>odbc::CallableStatement class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body bgcolor="#ffffff"><!-- Generated by Doxygen 1.2.13.1 --><center><a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="namespacemembers.html">Namespace Members</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </center><hr><h1>odbc::CallableStatement  Class Reference</h1>A prepared statement suited for stored procedure calls. <a href="#_details">More...</a><p><code>#include &lt;<a class="el" href="callablestatement_8h-source.html">callablestatement.h</a>&gt;</code><p><p>Inheritance diagram for odbc::CallableStatement::<p><center><img src="classodbc_1_1_callable_statement.gif" usemap="#odbc::CallableStatement_map" border="0"></center><map name="odbc::CallableStatement_map"><area href="classodbc_1_1_prepared_statement.html" alt="odbc::PreparedStatement" shape="rect" coords="0,112,153,136"><area href="classodbc_1_1_statement.html" alt="odbc::Statement" shape="rect" coords="0,56,153,80"><area href="classodbc_1_1_error_handler.html" alt="odbc::ErrorHandler" shape="rect" coords="0,0,153,24"></map><a href="classodbc_1_1_callable_statement-members.html">List of all members.</a><h2>Public Methods</h2><ul><li><a name="a0" doxytag="odbc::CallableStatement::~CallableStatement"></a>virtual <a class="el" href="classodbc_1_1_callable_statement.html#a0">~CallableStatement</a> ()<dl class="el"><dd><font size=-1><em>Destructor.<br><br></em></font></dl><li>double <a class="el" href="classodbc_1_1_callable_statement.html#a1">getDouble</a> (int idx)<dl class="el"><dd><font size=-1><em>Fetches a parameter as a double.</em> <a href="#a1">More...</a><em><br><br></em></font></dl><li>bool <a class="el" href="classodbc_1_1_callable_statement.html#a2">getBoolean</a> (int idx)<dl class="el"><dd><font size=-1><em>Fetches a parameter as a bool.</em> <a href="#a2">More...</a><em><br><br></em></font></dl><li>signed char <a class="el" href="classodbc_1_1_callable_statement.html#a3">getByte</a> (int idx)<dl class="el"><dd><font size=-1><em>Fetches a parameter as a signed char.</em> <a href="#a3">More...</a><em><br><br></em></font></dl><li><a class="el" href="classodbc_1_1_bytes.html">Bytes</a> <a class="el" href="classodbc_1_1_callable_statement.html#a4">getBytes</a> (int idx)<dl class="el"><dd><font size=-1><em>Fetches a parameter as a <a class="el" href="classodbc_1_1_bytes.html">Bytes</a> object.</em> <a href="#a4">More...</a><em><br><br></em></font></dl><li><a class="el" href="classodbc_1_1_date.html">Date</a> <a class="el" href="classodbc_1_1_callable_statement.html#a5">getDate</a> (int idx)<dl class="el"><dd><font size=-1><em>Fetches a parameter as a <a class="el" href="classodbc_1_1_date.html">Date</a>.</em> <a href="#a5">More...</a><em><br><br></em></font></dl><li>float <a class="el" href="classodbc_1_1_callable_statement.html#a6">getFloat</a> (int idx)<dl class="el"><dd><font size=-1><em>Fetches a parameter as a float.</em> <a href="#a6">More...</a><em><br><br></em></font></dl><li>int <a class="el" href="classodbc_1_1_callable_statement.html#a7">getInt</a> (int idx)<dl class="el"><dd><font size=-1><em>Fetches a parameter as an int.</em> <a href="#a7">More...</a><em><br><br></em></font></dl><li>Long <a class="el" href="classodbc_1_1_callable_statement.html#a8">getLong</a> (int idx)<dl class="el"><dd><font size=-1><em>Fetches a parameter as a Long.</em> <a href="#a8">More...</a><em><br><br></em></font></dl><li>short <a class="el" href="classodbc_1_1_callable_statement.html#a9">getShort</a> (int idx)<dl class="el"><dd><font size=-1><em>Fetches a parameter as a short.</em> <a href="#a9">More...</a><em><br><br></em></font></dl><li>std::string <a class="el" href="classodbc_1_1_callable_statement.html#a10">getString</a> (int idx)<dl class="el"><dd><font size=-1><em>Fetches a parameter as a string.</em> <a href="#a10">More...</a><em><br><br></em></font></dl><li><a class="el" href="classodbc_1_1_time.html">Time</a> <a class="el" href="classodbc_1_1_callable_statement.html#a11">getTime</a> (int idx)<dl class="el"><dd><font size=-1><em>Fetches a parameter as a <a class="el" href="classodbc_1_1_time.html">Time</a>.</em> <a href="#a11">More...</a><em><br><br></em></font></dl><li><a class="el" href="classodbc_1_1_timestamp.html">Timestamp</a> <a class="el" href="classodbc_1_1_callable_statement.html#a12">getTimestamp</a> (int idx)<dl class="el"><dd><font size=-1><em>Fetches a parameter as a <a class="el" href="classodbc_1_1_timestamp.html">Timestamp</a>.</em> <a href="#a12">More...</a><em><br><br></em></font></dl><li>void <a class="el" href="classodbc_1_1_callable_statement.html#a13">registerOutParameter</a> (int idx, int sqlType)<dl class="el"><dd><font size=-1><em>Registers an output parameter.</em> <a href="#a13">More...</a><em><br><br></em></font></dl><li>void <a class="el" href="classodbc_1_1_callable_statement.html#a14">registerOutParameter</a> (int idx, int sqlType, int scale)<dl class="el"><dd><font size=-1><em>Registers an output parameter with a given scale.</em> <a href="#a14">More...</a><em><br><br></em></font></dl><li>void <a class="el" href="classodbc_1_1_callable_statement.html#a15">registerInParameter</a> (int idx)<dl class="el"><dd><font size=-1><em>Registers an input only parameter.</em> <a href="#a15">More...</a><em><br><br></em></font></dl><li><a name="a16" doxytag="odbc::CallableStatement::wasNull"></a>bool <a class="el" href="classodbc_1_1_callable_statement.html#a16">wasNull</a> ()<dl class="el"><dd><font size=-1><em>Returns true if the last fetched parameter was NULL.<br><br></em></font></dl></ul><hr><a name="_details"></a><h2>Detailed Description</h2>A prepared statement suited for stored procedure calls.<p>A <code><a class="el" href="classodbc_1_1_callable_statement.html">CallableStatement</a></code> extends the functionality of a  <code><a class="el" href="classodbc_1_1_prepared_statement.html">PreparedStatement</a></code>, by allowing output parameters.<p>The ODBC escapes for calling stored procedures and functions  should be used. A procedure call is prepared like this: <pre> <a class="el" href="classodbc_1_1_callable_statement.html">CallableStatement</a>* cstmt=con-&gt;prepareCall     ("{call my_procedure(?,?,?)}"); </pre><p>And for a function call (a procedure that returns a value), the following syntax should be used: <pre> <a class="el" href="classodbc_1_1_callable_statement.html">CallableStatement</a>* cstmt=con-&gt;prepareCall     ("{?=call my_function(?,?)}");  </pre><p>All parameters in a <code><a class="el" href="classodbc_1_1_callable_statement.html">CallableStatement</a></code> are treated as input/output parameters, unless they are registered as output-only parameters with <a class="el" href="classodbc_1_1_callable_statement.html#a13">registerOutParameter</a>(). Note that output-only parameters must be registered with their proper SQL type prior to executing a <code><a class="el" href="classodbc_1_1_callable_statement.html">CallableStatement</a></code>. <p><hr><h2>Member Function Documentation</h2><a name="a2" doxytag="odbc::CallableStatement::getBoolean"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> bool odbc::CallableStatement::getBoolean </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">int&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>idx</em>          </td>          <td class="md" valign="top">)&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>Fetches a parameter as a bool.<p><dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>idx</em>&nbsp;</td><td>The parameter index, starting at 1 </td></tr></table></dl>    </td>  </tr></table><a name="a3" doxytag="odbc::CallableStatement::getByte"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> signed char odbc::CallableStatement::getByte </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">int&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>idx</em>          </td>          <td class="md" valign="top">)&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>Fetches a parameter as a signed char.<p><dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>idx</em>&nbsp;</td><td>The parameter index, starting at 1 </td></tr></table></dl>    </td>  </tr></table><a name="a4" doxytag="odbc::CallableStatement::getBytes"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> <a class="el" href="classodbc_1_1_bytes.html">Bytes</a> odbc::CallableStatement::getBytes </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">int&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>idx</em>          </td>          <td class="md" valign="top">)&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>Fetches a parameter as a <a class="el" href="classodbc_1_1_bytes.html">Bytes</a> object.<p><dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>idx</em>&nbsp;</td><td>The parameter index, starting at 1 </td></tr></table></dl>    </td>  </tr></table><a name="a5" doxytag="odbc::CallableStatement::getDate"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> <a class="el" href="classodbc_1_1_date.html">Date</a> odbc::CallableStatement::getDate </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">int&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>idx</em>          </td>          <td class="md" valign="top">)&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>Fetches a parameter as a <a class="el" href="classodbc_1_1_date.html">Date</a>.<p><dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>idx</em>&nbsp;</td><td>The parameter index, starting at 1 </td></tr></table></dl>    </td>  </tr></table><a name="a1" doxytag="odbc::CallableStatement::getDouble"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> double odbc::CallableStatement::getDouble </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">int&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>idx</em>          </td>          <td class="md" valign="top">)&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>Fetches a parameter as a double.<p><dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>idx</em>&nbsp;</td><td>The parameter index, starting at 1 </td></tr></table></dl>    </td>  </tr></table><a name="a6" doxytag="odbc::CallableStatement::getFloat"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> float odbc::CallableStatement::getFloat </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">int&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>idx</em>          </td>          <td class="md" valign="top">)&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>Fetches a parameter as a float.<p><dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>idx</em>&nbsp;</td><td>The parameter index, starting at 1 </td></tr></table></dl>    </td>  </tr></table><a name="a7" doxytag="odbc::CallableStatement::getInt"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> int odbc::CallableStatement::getInt </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">int&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>idx</em>          </td>          <td class="md" valign="top">)&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>Fetches a parameter as an int.<p><dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>idx</em>&nbsp;</td><td>The parameter index, starting at 1 </td></tr></table></dl>    </td>  </tr></table><a name="a8" doxytag="odbc::CallableStatement::getLong"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> Long odbc::CallableStatement::getLong </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">int&nbsp;</td>

⌨️ 快捷键说明

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