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

📄 classodbc_1_1_connection.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::Connection 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::Connection  Class Reference</h1>A database connection. <a href="#_details">More...</a><p><code>#include &lt;<a class="el" href="connection_8h-source.html">connection.h</a>&gt;</code><p><p>Inheritance diagram for odbc::Connection::<p><center><img src="classodbc_1_1_connection.gif" usemap="#odbc::Connection_map" border="0"></center><map name="odbc::Connection_map"><area href="classodbc_1_1_error_handler.html" alt="odbc::ErrorHandler" shape="rect" coords="0,0,121,24"></map><a href="classodbc_1_1_connection-members.html">List of all members.</a><h2>Public Types</h2><ul><li>enum <a class="el" href="classodbc_1_1_connection.html#s5">TransactionIsolation</a> { <br>&nbsp;&nbsp;<a class="el" href="classodbc_1_1_connection.html#s5s0">TRANSACTION_NONE</a>, <a class="el" href="classodbc_1_1_connection.html#s5s1">TRANSACTION_READ_UNCOMMITTED</a>, <a class="el" href="classodbc_1_1_connection.html#s5s2">TRANSACTION_READ_COMMITTED</a>, <a class="el" href="classodbc_1_1_connection.html#s5s3">TRANSACTION_REPEATABLE_READ</a>, <br>&nbsp;&nbsp;<a class="el" href="classodbc_1_1_connection.html#s5s4">TRANSACTION_SERIALIZABLE</a><br> }<dl class="el"><dd><font size=-1><em>Transaction isolation constants.</em> <a href="#s5">More...</a><em><br><br></em></font></dl></ul><h2>Public Methods</h2><ul><li>virtual <a class="el" href="classodbc_1_1_connection.html#a0">~Connection</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::Connection::getAutoCommit"></a>bool <a class="el" href="classodbc_1_1_connection.html#a1">getAutoCommit</a> ()<dl class="el"><dd><font size=-1><em>Returns true if autocommit is on.<br><br></em></font></dl><li>void <a class="el" href="classodbc_1_1_connection.html#a2">setAutoCommit</a> (bool autoCommit)<dl class="el"><dd><font size=-1><em>Sets the autocommit state of this connection.</em> <a href="#a2">More...</a><em><br><br></em></font></dl><li><a name="a3" doxytag="odbc::Connection::commit"></a>void <a class="el" href="classodbc_1_1_connection.html#a3">commit</a> ()<dl class="el"><dd><font size=-1><em>Commits the ongoing transaction.<br><br></em></font></dl><li><a name="a4" doxytag="odbc::Connection::rollback"></a>void <a class="el" href="classodbc_1_1_connection.html#a4">rollback</a> ()<dl class="el"><dd><font size=-1><em>Rollbacks the ongoing transaction.<br><br></em></font></dl><li><a name="a5" doxytag="odbc::Connection::getCatalog"></a>std::string <a class="el" href="classodbc_1_1_connection.html#a5">getCatalog</a> ()<dl class="el"><dd><font size=-1><em>Returns the current catalog.<br><br></em></font></dl><li><a name="a6" doxytag="odbc::Connection::setCatalog"></a>void <a class="el" href="classodbc_1_1_connection.html#a6">setCatalog</a> (const std::string &amp;catalog)<dl class="el"><dd><font size=-1><em>Sets the current catalog.<br><br></em></font></dl><li><a name="a7" doxytag="odbc::Connection::getTransactionIsolation"></a><a class="el" href="classodbc_1_1_connection.html#s5">TransactionIsolation</a> <a class="el" href="classodbc_1_1_connection.html#a7">getTransactionIsolation</a> ()<dl class="el"><dd><font size=-1><em>Returns the current transaction isolation level.<br><br></em></font></dl><li><a name="a8" doxytag="odbc::Connection::setTransactionIsolation"></a>void <a class="el" href="classodbc_1_1_connection.html#a8">setTransactionIsolation</a> (<a class="el" href="classodbc_1_1_connection.html#s5">TransactionIsolation</a> isolation)<dl class="el"><dd><font size=-1><em>Sets the current transaction isolation level.<br><br></em></font></dl><li><a name="a9" doxytag="odbc::Connection::isReadOnly"></a>bool <a class="el" href="classodbc_1_1_connection.html#a9">isReadOnly</a> ()<dl class="el"><dd><font size=-1><em>Returns true if the connection is read only.<br><br></em></font></dl><li><a name="a10" doxytag="odbc::Connection::setReadOnly"></a>void <a class="el" href="classodbc_1_1_connection.html#a10">setReadOnly</a> (bool readOnly)<dl class="el"><dd><font size=-1><em>Sets the read-only state of this connection.<br><br></em></font></dl><li><a name="a11" doxytag="odbc::Connection::getTrace"></a>bool <a class="el" href="classodbc_1_1_connection.html#a11">getTrace</a> ()<dl class="el"><dd><font size=-1><em>Returns true if ODBC tracing is enabled on this connection.<br><br></em></font></dl><li><a name="a12" doxytag="odbc::Connection::setTrace"></a>void <a class="el" href="classodbc_1_1_connection.html#a12">setTrace</a> (bool on)<dl class="el"><dd><font size=-1><em>Sets ODBC tracing on or off.<br><br></em></font></dl><li><a name="a13" doxytag="odbc::Connection::getTraceFile"></a>std::string <a class="el" href="classodbc_1_1_connection.html#a13">getTraceFile</a> ()<dl class="el"><dd><font size=-1><em>Returns the file ODBC tracing is currently written to.<br><br></em></font></dl><li><a name="a14" doxytag="odbc::Connection::setTraceFile"></a>void <a class="el" href="classodbc_1_1_connection.html#a14">setTraceFile</a> (const std::string &amp;s)<dl class="el"><dd><font size=-1><em>Sets the file ODBC tracing is written to.<br><br></em></font></dl><li><a class="el" href="classodbc_1_1_database_meta_data.html">DatabaseMetaData</a> * <a class="el" href="classodbc_1_1_connection.html#a15">getMetaData</a> ()<dl class="el"><dd><font size=-1><em>Returns meta information for this connection.</em> <a href="#a15">More...</a><em><br><br></em></font></dl><li><a name="a16" doxytag="odbc::Connection::createStatement"></a><a class="el" href="classodbc_1_1_statement.html">Statement</a> * <a class="el" href="classodbc_1_1_connection.html#a16">createStatement</a> ()<dl class="el"><dd><font size=-1><em>Creates a non-prepared statement.<br><br></em></font></dl><li><a class="el" href="classodbc_1_1_statement.html">Statement</a> * <a class="el" href="classodbc_1_1_connection.html#a17">createStatement</a> (int resultSetType, int resultSetConcurrency)<dl class="el"><dd><font size=-1><em>Creates a non-prepared statement.</em> <a href="#a17">More...</a><em><br><br></em></font></dl><li><a class="el" href="classodbc_1_1_prepared_statement.html">PreparedStatement</a> * <a class="el" href="classodbc_1_1_connection.html#a18">prepareStatement</a> (const std::string &amp;sql)<dl class="el"><dd><font size=-1><em>Create a prepared statement.</em> <a href="#a18">More...</a><em><br><br></em></font></dl><li><a class="el" href="classodbc_1_1_prepared_statement.html">PreparedStatement</a> * <a class="el" href="classodbc_1_1_connection.html#a19">prepareStatement</a> (const std::string &amp;sql, int resultSetType, int resultSetConcurrency)<dl class="el"><dd><font size=-1><em>Create a prepared statement.</em> <a href="#a19">More...</a><em><br><br></em></font></dl><li><a class="el" href="classodbc_1_1_callable_statement.html">CallableStatement</a> * <a class="el" href="classodbc_1_1_connection.html#a20">prepareCall</a> (const std::string &amp;sql)<dl class="el"><dd><font size=-1><em>Create a callable prepared statement.</em> <a href="#a20">More...</a><em><br><br></em></font></dl><li><a class="el" href="classodbc_1_1_callable_statement.html">CallableStatement</a> * <a class="el" href="classodbc_1_1_connection.html#a21">prepareCall</a> (const std::string &amp;sql, int resultSetType, int resultSetConcurrency)<dl class="el"><dd><font size=-1><em>Create a callable prepared statement.</em> <a href="#a21">More...</a><em><br><br></em></font></dl><li><a name="a22" doxytag="odbc::Connection::nativeSQL"></a>std::string <a class="el" href="classodbc_1_1_connection.html#a22">nativeSQL</a> (const std::string &amp;sql)<dl class="el"><dd><font size=-1><em>Translate a given SQL string into this data sources' own SQL grammar.<br><br></em></font></dl></ul><hr><a name="_details"></a><h2>Detailed Description</h2>A database connection.<p><hr><h2>Member Enumeration Documentation</h2><a name="s5" doxytag="odbc::Connection::TransactionIsolation"></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"> enum odbc::Connection::TransactionIsolation      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Transaction isolation constants.<p><dl compact><dt><b>Enumeration values:</b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em><a name="s5s0" doxytag="TRANSACTION_NONE"></a><em>TRANSACTION_NONE</em></em>&nbsp;</td><td>The data source does not support transactions.</td></tr><tr><td valign=top><em><a name="s5s1" doxytag="TRANSACTION_READ_UNCOMMITTED"></a><em>TRANSACTION_READ_UNCOMMITTED</em></em>&nbsp;</td><td>Dirty reads, non-repeatable reads and phantom reads can occur.</td></tr><tr><td valign=top><em><a name="s5s2" doxytag="TRANSACTION_READ_COMMITTED"></a><em>TRANSACTION_READ_COMMITTED</em></em>&nbsp;</td><td>Non-repeatable and phantom reads can occur.</td></tr><tr><td valign=top><em><a name="s5s3" doxytag="TRANSACTION_REPEATABLE_READ"></a><em>TRANSACTION_REPEATABLE_READ</em></em>&nbsp;</td><td>Phantom reads can occur.</td></tr><tr><td valign=top><em><a name="s5s4" doxytag="TRANSACTION_SERIALIZABLE"></a><em>TRANSACTION_SERIALIZABLE</em></em>&nbsp;</td><td>Simply no problems.</td></tr></table></dl>    </td>  </tr></table><hr><h2>Constructor &amp; Destructor Documentation</h2><a name="a0" doxytag="odbc::Connection::~Connection"></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::Connection::~Connection </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap><code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Destructor.<p>Closes the connection     </td>  </tr></table><hr><h2>Member Function Documentation</h2><a name="a17" doxytag="odbc::Connection::createStatement"></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_statement.html">Statement</a>* odbc::Connection::createStatement </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">int&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>resultSetType</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>int&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>resultSetConcurrency</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>Creates a non-prepared statement.<p><dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>resultSetType</em>&nbsp;</td><td>The type for <code><a class="el" href="classodbc_1_1_result_set.html">ResultSet</a></code>s created by this statement </td></tr><tr><td valign=top><em>resultSetConcurrency</em>&nbsp;</td><td>The concurrency for <code><a class="el" href="classodbc_1_1_result_set.html">ResultSet</a></code>s created by this statement </td></tr></table></dl>    </td>  </tr></table><a name="a15" doxytag="odbc::Connection::getMetaData"></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_database_meta_data.html">DatabaseMetaData</a>* odbc::Connection::getMetaData </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp;          </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>Returns meta information for this connection.<p>Note that the returned object is 'owned' by this connection and should in no way be deleted by the caller.     </td>  </tr></table><a name="a21" doxytag="odbc::Connection::prepareCall"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>

⌨️ 快捷键说明

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