Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 204ec3a8a895ae5700811efd516cad83 > files > 16

libzdb-devel-2.8.1-1.fc15.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>libzdb: PreparedStatement.h File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
<style type="text/css" media="screen">
    body,div,p,dl{font: normal normal normal 14px/18px Helvetica,Arial,sans-serif;}
</style>
</head><body>
<!-- Generated by Doxygen 1.5.8 -->
<div class="contents">
<h1>PreparedStatement.h File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
A <b>PreparedStatement</b> represent a single SQL statement pre-compiled into byte code for later execution. 
<p>
The SQL statement may contain <em>in</em> parameters of the form "?". Such parameters represent unspecified literal values (or "wildcards") to be filled in later by the various setter methods defined in this interface. Each <em>in</em> parameter has an associated index number which is its sequence in the statement. The first <em>in</em> '?' parameter has index 1, the next has index 2 and so on. A PreparedStatement is created by the <a class="el" href="Connection_8h.html#16dfbbe273d9a872462bed182dec3bb5" title="Creates a PreparedStatement object for sending parameterized SQL statements to the...">Connection_prepareStatement()</a> method.<p>
Consider this statement: <pre>
  INSERT INTO employee(name, picture) VALUES(?, ?)
 </pre> There are two <em>in</em> parameters in this statement, the parameter for setting the name has index 1 and the one for the picture has index 2. To set the values for the <em>in</em> parameters we use a setter method. Assuming name has a string value we use <a class="el" href="PreparedStatement_8h.html#618654d179459a9394828a4117f97d05" title="Sets the in parameter at index parameterIndex to the given string value.">PreparedStatement_setString()</a>. To set the value of the picture we submit a binary value using the method <a class="el" href="PreparedStatement_8h.html#c19d3cb5e6ee2222c1320f9aee7547ff" title="Sets the in parameter at index parameterIndex to the given blob value.">PreparedStatement_setBlob()</a>.<p>
Note that string and blob parameter values are set by reference and <b>must</b> not "disappear" before either <a class="el" href="PreparedStatement_8h.html#6f0eb01daec7f61bf92707b7de0a246f" title="Executes the prepared SQL statement, which may be an INSERT, UPDATE, or DELETE statement...">PreparedStatement_execute()</a> or <a class="el" href="PreparedStatement_8h.html#3e33ed8289ac8b8b11438b009a169e63" title="Executes the prepared SQL statement, which returns a single ResultSet object.">PreparedStatement_executeQuery()</a> is called.<p>
<h3>Example:</h3>
<p>
To summarize, here is the code in context. <pre>
 PreparedStatement_T p = Connection_prepareStatement(con, "INSERT INTO employee(name, picture) VALUES(?, ?)");
 PreparedStatement_setString(p, 1, "Kamiya Kaoru");
 PreparedStatement_setBlob(p, 2, jpeg, jpeg_size);
 PreparedStatement_execute(p);
 </pre> <h3>Reuse:</h3>
<p>
A PreparedStatement can be reused. That is, the method <a class="el" href="PreparedStatement_8h.html#6f0eb01daec7f61bf92707b7de0a246f" title="Executes the prepared SQL statement, which may be an INSERT, UPDATE, or DELETE statement...">PreparedStatement_execute()</a> can be called one or more times to execute the same statement. Clients can also set new <em>in</em> parameter values and re-execute the statement as shown in this example: <pre>
 PreparedStatement_T p = Connection_prepareStatement(con, "INSERT INTO employee(name, picture) VALUES(?, ?)");
 for (int i = 0; employees[i].name; i++) 
 {
        PreparedStatement_setString(p, 1, employees[i].name);
        PreparedStatement_setBlob(p, 2, employees[i].picture, employees[i].picture_size);
        PreparedStatement_execute(p);
 }
 </pre> <h3>Result Sets:</h3>
<p>
Here is another example where we use a Prepared Statement to execute a query which returns a Result Set:<p>
<pre>
 PreparedStatement_T p = Connection_prepareStatement(con, "SELECT id FROM employee WHERE name LIKE ?"); 
 PreparedStatement_setString(p, 1, "%Kaoru%");
 ResultSet_T r = PreparedStatement_executeQuery(p);
 while (ResultSet_next(r))
        printf("employee.id = %d\n", ResultSet_getInt(r, 1));
 </pre><p>
A ResultSet returned from <a class="el" href="PreparedStatement_8h.html#3e33ed8289ac8b8b11438b009a169e63" title="Executes the prepared SQL statement, which returns a single ResultSet object.">PreparedStatement_executeQuery()</a> "lives" until the Prepared Statement is executed again or until the Connection is returned to the Connection Pool.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="Connection_8h.html" title="A Connection represent a connection to a SQL database system.">Connection.h</a> <a class="el" href="ResultSet_8h.html" title="A ResultSet represents a database result set.">ResultSet.h</a> <a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred.">SQLException.h</a> </dd></dl>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="PreparedStatement_8h.html#0acb682b8260ab1c60b918599864e2e5">T</a>&nbsp;&nbsp;&nbsp;PreparedStatement_T</td></tr>

<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef struct <a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="PreparedStatement_8h.html#24514489b0962fafe8414bfae95aa268">T</a></td></tr>

<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="PreparedStatement_8h.html#618654d179459a9394828a4117f97d05">PreparedStatement_setString</a> (<a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a> P, int parameterIndex, const char *x)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the <em>in</em> parameter at index <code>parameterIndex</code> to the given string value.  <a href="#618654d179459a9394828a4117f97d05"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="PreparedStatement_8h.html#350056fea6744da297b674bfbe1ee94e">PreparedStatement_setInt</a> (<a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a> P, int parameterIndex, int x)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the <em>in</em> parameter at index <code>parameterIndex</code> to the given int value.  <a href="#350056fea6744da297b674bfbe1ee94e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="PreparedStatement_8h.html#9b9fcff289f18c1109eea5a048e26dd8">PreparedStatement_setLLong</a> (<a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a> P, int parameterIndex, long long int x)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the <em>in</em> parameter at index <code>parameterIndex</code> to the given long long value.  <a href="#9b9fcff289f18c1109eea5a048e26dd8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="PreparedStatement_8h.html#023adeb93e4ff455d57a9a5be8d1e26f">PreparedStatement_setDouble</a> (<a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a> P, int parameterIndex, double x)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the <em>in</em> parameter at index <code>parameterIndex</code> to the given double value.  <a href="#023adeb93e4ff455d57a9a5be8d1e26f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="PreparedStatement_8h.html#c19d3cb5e6ee2222c1320f9aee7547ff">PreparedStatement_setBlob</a> (<a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a> P, int parameterIndex, const void *x, int size)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the <em>in</em> parameter at index <code>parameterIndex</code> to the given blob value.  <a href="#c19d3cb5e6ee2222c1320f9aee7547ff"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="PreparedStatement_8h.html#6f0eb01daec7f61bf92707b7de0a246f">PreparedStatement_execute</a> (<a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a> P)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Executes the prepared SQL statement, which may be an INSERT, UPDATE, or DELETE statement or an SQL statement that returns nothing, such as an SQL DDL statement.  <a href="#6f0eb01daec7f61bf92707b7de0a246f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">ResultSet_T&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="PreparedStatement_8h.html#3e33ed8289ac8b8b11438b009a169e63">PreparedStatement_executeQuery</a> (<a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a> P)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Executes the prepared SQL statement, which returns a single ResultSet object.  <a href="#3e33ed8289ac8b8b11438b009a169e63"></a><br></td></tr>
</table>
<hr><h2>Define Documentation</h2>
<a class="anchor" name="0acb682b8260ab1c60b918599864e2e5"></a><!-- doxytag: member="PreparedStatement.h::T" ref="0acb682b8260ab1c60b918599864e2e5" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a>&nbsp;&nbsp;&nbsp;PreparedStatement_T          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<hr><h2>Typedef Documentation</h2>
<a class="anchor" name="24514489b0962fafe8414bfae95aa268"></a><!-- doxytag: member="PreparedStatement.h::T" ref="24514489b0962fafe8414bfae95aa268" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a>* <a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="618654d179459a9394828a4117f97d05"></a><!-- doxytag: member="PreparedStatement.h::PreparedStatement_setString" ref="618654d179459a9394828a4117f97d05" args="(T P, int parameterIndex, const char *x)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void PreparedStatement_setString           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a>&nbsp;</td>
          <td class="paramname"> <em>P</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>parameterIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>x</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Sets the <em>in</em> parameter at index <code>parameterIndex</code> to the given string value. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>P</em>&nbsp;</td><td>A PreparedStatement object </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>parameterIndex</em>&nbsp;</td><td>The first parameter is 1, the second is 2,.. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>x</em>&nbsp;</td><td>The string value to set. Must be a NUL terminated string. NULL is allowed to indicate a SQL NULL value. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>SQLException</em>&nbsp;</td><td>if a database access error occurs or if parameter index is out of range </td></tr>
  </table>
</dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred.">SQLException.h</a> </dd></dl>

</div>
</div><p>
<a class="anchor" name="350056fea6744da297b674bfbe1ee94e"></a><!-- doxytag: member="PreparedStatement.h::PreparedStatement_setInt" ref="350056fea6744da297b674bfbe1ee94e" args="(T P, int parameterIndex, int x)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void PreparedStatement_setInt           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a>&nbsp;</td>
          <td class="paramname"> <em>P</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>parameterIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>x</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Sets the <em>in</em> parameter at index <code>parameterIndex</code> to the given int value. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>P</em>&nbsp;</td><td>A PreparedStatement object </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>parameterIndex</em>&nbsp;</td><td>The first parameter is 1, the second is 2,.. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>x</em>&nbsp;</td><td>The int value to set </td></tr>
  </table>
</dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>SQLException</em>&nbsp;</td><td>if a database access error occurs or if parameter index is out of range </td></tr>
  </table>
</dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred.">SQLException.h</a> </dd></dl>

</div>
</div><p>
<a class="anchor" name="9b9fcff289f18c1109eea5a048e26dd8"></a><!-- doxytag: member="PreparedStatement.h::PreparedStatement_setLLong" ref="9b9fcff289f18c1109eea5a048e26dd8" args="(T P, int parameterIndex, long long int x)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void PreparedStatement_setLLong           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a>&nbsp;</td>
          <td class="paramname"> <em>P</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>parameterIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long long int&nbsp;</td>
          <td class="paramname"> <em>x</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Sets the <em>in</em> parameter at index <code>parameterIndex</code> to the given long long value. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>P</em>&nbsp;</td><td>A PreparedStatement object </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>parameterIndex</em>&nbsp;</td><td>The first parameter is 1, the second is 2,.. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>x</em>&nbsp;</td><td>The long long value to set </td></tr>
  </table>
</dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>SQLException</em>&nbsp;</td><td>if a database access error occurs or if parameter index is out of range </td></tr>
  </table>
</dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred.">SQLException.h</a> </dd></dl>

</div>
</div><p>
<a class="anchor" name="023adeb93e4ff455d57a9a5be8d1e26f"></a><!-- doxytag: member="PreparedStatement.h::PreparedStatement_setDouble" ref="023adeb93e4ff455d57a9a5be8d1e26f" args="(T P, int parameterIndex, double x)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void PreparedStatement_setDouble           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a>&nbsp;</td>
          <td class="paramname"> <em>P</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>parameterIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>x</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Sets the <em>in</em> parameter at index <code>parameterIndex</code> to the given double value. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>P</em>&nbsp;</td><td>A PreparedStatement object </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>parameterIndex</em>&nbsp;</td><td>The first parameter is 1, the second is 2,.. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>x</em>&nbsp;</td><td>The double value to set </td></tr>
  </table>
</dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>SQLException</em>&nbsp;</td><td>if a database access error occurs or if parameter index is out of range </td></tr>
  </table>
</dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred.">SQLException.h</a> </dd></dl>

</div>
</div><p>
<a class="anchor" name="c19d3cb5e6ee2222c1320f9aee7547ff"></a><!-- doxytag: member="PreparedStatement.h::PreparedStatement_setBlob" ref="c19d3cb5e6ee2222c1320f9aee7547ff" args="(T P, int parameterIndex, const void *x, int size)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void PreparedStatement_setBlob           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a>&nbsp;</td>
          <td class="paramname"> <em>P</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>parameterIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&nbsp;</td>
          <td class="paramname"> <em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>size</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Sets the <em>in</em> parameter at index <code>parameterIndex</code> to the given blob value. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>P</em>&nbsp;</td><td>A PreparedStatement object </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>parameterIndex</em>&nbsp;</td><td>The first parameter is 1, the second is 2,.. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>x</em>&nbsp;</td><td>The blob value to set </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>The number of bytes in the blob </td></tr>
  </table>
</dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>SQLException</em>&nbsp;</td><td>if a database access error occurs or if parameter index is out of range </td></tr>
  </table>
</dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred.">SQLException.h</a> </dd></dl>

</div>
</div><p>
<a class="anchor" name="6f0eb01daec7f61bf92707b7de0a246f"></a><!-- doxytag: member="PreparedStatement.h::PreparedStatement_execute" ref="6f0eb01daec7f61bf92707b7de0a246f" args="(T P)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void PreparedStatement_execute           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a>&nbsp;</td>
          <td class="paramname"> <em>P</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Executes the prepared SQL statement, which may be an INSERT, UPDATE, or DELETE statement or an SQL statement that returns nothing, such as an SQL DDL statement. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>P</em>&nbsp;</td><td>A PreparedStatement object </td></tr>
  </table>
</dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>SQLException</em>&nbsp;</td><td>if a database error occurs </td></tr>
  </table>
</dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred.">SQLException.h</a> </dd></dl>

</div>
</div><p>
<a class="anchor" name="3e33ed8289ac8b8b11438b009a169e63"></a><!-- doxytag: member="PreparedStatement.h::PreparedStatement_executeQuery" ref="3e33ed8289ac8b8b11438b009a169e63" args="(T P)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ResultSet_T PreparedStatement_executeQuery           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="URL_8h.html#24514489b0962fafe8414bfae95aa268">T</a>&nbsp;</td>
          <td class="paramname"> <em>P</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Executes the prepared SQL statement, which returns a single ResultSet object. 
<p>
A ResultSet "lives" only until the next call to a PreparedStatement method or until the Connection is returned to the Connection Pool. <em>This means that Result Sets cannot be saved between queries</em>. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>P</em>&nbsp;</td><td>A PreparedStatement object </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>A ResultSet object that contains the data produced by the prepared statement. </dd></dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>SQLException</em>&nbsp;</td><td>if a database error occurs </td></tr>
  </table>
</dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="ResultSet_8h.html" title="A ResultSet represents a database result set.">ResultSet.h</a> <p>
<a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred.">SQLException.h</a> </dd></dl>

</div>
</div><p>
</div>
<p style="text-align:center;color:#808080;font-size:90%;margin:40px 0 20px 0;">
Copyright &copy; 2004-2011 <a href="http://tildeslash.com/">Tildeslash Ltd</a>. All
rights reserved.</p>
</body></html>