📄 classodbc_1_1_statement.html.svn-base
字号:
<!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::Statement 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> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="namespacemembers.html">Namespace Members</a> <a class="qindex" href="functions.html">Compound Members</a> </center><hr><h1>odbc::Statement Class Reference</h1>A simple non-prepared statement. <a href="#_details">More...</a><p><code>#include <<a class="el" href="statement_8h-source.html">statement.h</a>></code><p><p>Inheritance diagram for odbc::Statement::<p><center><img src="classodbc_1_1_statement.gif" usemap="#odbc::Statement_map" border="0"></center><map name="odbc::Statement_map"><area href="classodbc_1_1_error_handler.html" alt="odbc::ErrorHandler" shape="rect" coords="0,0,153,24"><area href="classodbc_1_1_prepared_statement.html" alt="odbc::PreparedStatement" shape="rect" coords="0,112,153,136"><area href="classodbc_1_1_callable_statement.html" alt="odbc::CallableStatement" shape="rect" coords="0,168,153,192"></map><a href="classodbc_1_1_statement-members.html">List of all members.</a><h2>Public Methods</h2><ul><li>virtual <a class="el" href="classodbc_1_1_statement.html#a0">~Statement</a> ()<dl class="el"><dd><font size=-1><em>Destructor.</em> <a href="#a0">More...</a><em><br><br></em></font></dl><li><a name="a1" doxytag="odbc::Statement::getConnection"></a><a class="el" href="classodbc_1_1_connection.html">Connection</a> * <a class="el" href="classodbc_1_1_statement.html#a1">getConnection</a> ()<dl class="el"><dd><font size=-1><em>Returns the connection that created this statement.<br><br></em></font></dl><li><a name="a2" doxytag="odbc::Statement::cancel"></a>void <a class="el" href="classodbc_1_1_statement.html#a2">cancel</a> ()<dl class="el"><dd><font size=-1><em>Cancel an ongoing operation that was executed in another thread.<br><br></em></font></dl><li>virtual bool <a class="el" href="classodbc_1_1_statement.html#a3">execute</a> (const std::string &sql)<dl class="el"><dd><font size=-1><em>Execute a given SQL statement.</em> <a href="#a3">More...</a><em><br><br></em></font></dl><li>virtual <a class="el" href="classodbc_1_1_result_set.html">ResultSet</a> * <a class="el" href="classodbc_1_1_statement.html#a4">executeQuery</a> (const std::string &sql)<dl class="el"><dd><font size=-1><em>Execute an SQL statement, expected to return a resultset.</em> <a href="#a4">More...</a><em><br><br></em></font></dl><li>virtual int <a class="el" href="classodbc_1_1_statement.html#a5">executeUpdate</a> (const std::string &sql)<dl class="el"><dd><font size=-1><em>Execute an SQL statement, expected to return an update count.</em> <a href="#a5">More...</a><em><br><br></em></font></dl><li>int <a class="el" href="classodbc_1_1_statement.html#a6">getUpdateCount</a> ()<dl class="el"><dd><font size=-1><em>Fetch the current result as an update count.</em> <a href="#a6">More...</a><em><br><br></em></font></dl><li><a name="a7" doxytag="odbc::Statement::getResultSet"></a><a class="el" href="classodbc_1_1_result_set.html">ResultSet</a> * <a class="el" href="classodbc_1_1_statement.html#a7">getResultSet</a> ()<dl class="el"><dd><font size=-1><em>Fetch the current result as a <a class="el" href="classodbc_1_1_result_set.html">ResultSet</a>.<br><br></em></font></dl><li>bool <a class="el" href="classodbc_1_1_statement.html#a8">getMoreResults</a> ()<dl class="el"><dd><font size=-1><em>Check if there are more results available on this statment.</em> <a href="#a8">More...</a><em><br><br></em></font></dl><li><a name="a9" doxytag="odbc::Statement::setCursorName"></a>void <a class="el" href="classodbc_1_1_statement.html#a9">setCursorName</a> (const std::string &name)<dl class="el"><dd><font size=-1><em>Set the cursor name for this statement.<br><br></em></font></dl><li><a name="a10" doxytag="odbc::Statement::getFetchSize"></a>int <a class="el" href="classodbc_1_1_statement.html#a10">getFetchSize</a> ()<dl class="el"><dd><font size=-1><em>Fetch the current fetch size (also called rowset size) for resultsets created by this statement.<br><br></em></font></dl><li><a name="a11" doxytag="odbc::Statement::setFetchSize"></a>void <a class="el" href="classodbc_1_1_statement.html#a11">setFetchSize</a> (int size)<dl class="el"><dd><font size=-1><em>Set the current fetch size for resultsets created by this statement.<br><br></em></font></dl><li><a name="a12" doxytag="odbc::Statement::getResultSetConcurrency"></a>int <a class="el" href="classodbc_1_1_statement.html#a12">getResultSetConcurrency</a> ()<dl class="el"><dd><font size=-1><em>Get the concurrency type for resultsets created by this statement.<br><br></em></font></dl><li><a name="a13" doxytag="odbc::Statement::getResultSetType"></a>int <a class="el" href="classodbc_1_1_statement.html#a13">getResultSetType</a> ()<dl class="el"><dd><font size=-1><em>Get the type for resultsets created by this statement.<br><br></em></font></dl><li><a name="a14" doxytag="odbc::Statement::getQueryTimeout"></a>int <a class="el" href="classodbc_1_1_statement.html#a14">getQueryTimeout</a> ()<dl class="el"><dd><font size=-1><em>Get the query timeout for this statement.<br><br></em></font></dl><li><a name="a15" doxytag="odbc::Statement::setQueryTimeout"></a>void <a class="el" href="classodbc_1_1_statement.html#a15">setQueryTimeout</a> (int seconds)<dl class="el"><dd><font size=-1><em>Set the query timeout for this statement.<br><br></em></font></dl><li><a name="a16" doxytag="odbc::Statement::getMaxRows"></a>int <a class="el" href="classodbc_1_1_statement.html#a16">getMaxRows</a> ()<dl class="el"><dd><font size=-1><em>Get the maximum number of rows to return in a resultset.<br><br></em></font></dl><li><a name="a17" doxytag="odbc::Statement::setMaxRows"></a>void <a class="el" href="classodbc_1_1_statement.html#a17">setMaxRows</a> (int maxRows)<dl class="el"><dd><font size=-1><em>Set the maximum number of rows to return in a resultset.<br><br></em></font></dl><li><a name="a18" doxytag="odbc::Statement::getMaxFieldSize"></a>int <a class="el" href="classodbc_1_1_statement.html#a18">getMaxFieldSize</a> ()<dl class="el"><dd><font size=-1><em>Get the maximum field size for resultsets create by this statement.<br><br></em></font></dl><li><a name="a19" doxytag="odbc::Statement::setMaxFieldSize"></a>void <a class="el" href="classodbc_1_1_statement.html#a19">setMaxFieldSize</a> (int maxFieldSize)<dl class="el"><dd><font size=-1><em>Set the maximum field size for resultsets create by this statement.<br><br></em></font></dl><li>void <a class="el" href="classodbc_1_1_statement.html#a20">setEscapeProcessing</a> (bool on)<dl class="el"><dd><font size=-1><em>Sets escape processing on or off.</em> <a href="#a20">More...</a><em><br><br></em></font></dl><li>bool <a class="el" href="classodbc_1_1_statement.html#a21">getEscapeProcessing</a> ()<dl class="el"><dd><font size=-1><em>Gets the current escape processing setting.</em> <a href="#a21">More...</a><em><br><br></em></font></dl><li>void <a class="el" href="classodbc_1_1_statement.html#a22">close</a> ()<dl class="el"><dd><font size=-1><em>Closes all result sets from this execution.</em> <a href="#a22">More...</a><em><br><br></em></font></dl></ul><hr><a name="_details"></a><h2>Detailed Description</h2>A simple non-prepared statement.<p><hr><h2>Constructor & Destructor Documentation</h2><a name="a0" doxytag="odbc::Statement::~Statement"></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"> virtual odbc::Statement::~Statement </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Destructor.<p>Destroys/closes this statement as well as all created resultsets. </td> </tr></table><hr><h2>Member Function Documentation</h2><a name="a22" doxytag="odbc::Statement::close"></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"> void odbc::Statement::close </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Closes all result sets from this execution.<p>This is useful if you don't wish to iterate through all remaining results, or if your driver does not auto-close cursors. </td> </tr></table><a name="a3" doxytag="odbc::Statement::execute"></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"> virtual bool odbc::Statement::execute </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const std::string & </td> <td class="mdname1" valign="top" nowrap> <em>sql</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Execute a given SQL statement.<p>The statement can return multiple results. To get to the next result after processing the first one, <a class="el" href="classodbc_1_1_statement.html#a8">getMoreResults</a>() should be called. <dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>sql</em> </td><td>The string to execute </td></tr></table></dl><dl compact><dt><b>Returns: </b><dd>true if a resultset is available </dl> </td> </tr></table><a name="a4" doxytag="odbc::Statement::executeQuery"></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"> virtual <a class="el" href="classodbc_1_1_result_set.html">ResultSet</a>* odbc::Statement::executeQuery </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const std::string & </td> <td class="mdname1" valign="top" nowrap> <em>sql</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -