Sophie

Sophie

distrib > * > cooker > x86_64 > by-pkgid > 5fb1c39f9f9130a3cc01e8b1ffa5c0f8 > files > 5332

libreoffice-devel-3.5.4-4.x86_64.rpm

<html>
<head>
<title>Service PreparedStatement</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../../idl.css">
</head>
<body>
<div id="adc-idlref">

<a name="_top_"> </a><table class="navimain" border="0" cellpadding="3">
<tr>
<td class="navimain"><a href="../module-ix.html" class="navimain">Overview</a></td>
<td class="navimain"><a href="module-ix.html" class="navimain">Module</a></td>
<td class="navimain"><a href="PreparedStatement-xref.html" class="navimain">Use</a></td>
<td class="navimainnone">Devguide</td>
<td class="navimain"><a href="../../../../index-files/index-1.html" class="navimain">Index</a></td>
</tr>
</table>
<table class="navisub" border="0" cellpadding="0">
<tr>
<td class="navisub">Services' Summary</td>
<td class="navisub"><a href="#InterfacesSummary" class="navisub">Interfaces' Summary</a></td>
<td class="navisub"><a href="#PropertiesSummary" class="navisub">Properties' Summary</a></td>
<td class="navisub">Services' Details</td>
<td class="navisub"><a href="#InterfacesDetails" class="navisub">Interfaces' Details</a></td>
<td class="navisub"><a href="#PropertiesDetails" class="navisub">Properties' Details</a></td>
</tr>
</table>
<hr>
<table border="0" width="100%" cellpadding="5" cellspacing="3" class="title-table" style="margin-bottom:6pt;">
<tr>
<td><p class="namechain"><a href="../../../../module-ix.html" class="namechain">::</a> <a href="../../../module-ix.html" class="namechain">com</a> :: <a href="../../module-ix.html" class="namechain">sun</a> :: <a href="../module-ix.html" class="namechain">star</a> :: <a href="module-ix.html" class="namechain">sdbc</a> :: </p>
</td>
</tr>
<tr>
<td class="title">service PreparedStatement</td>
</tr>
<tr>
<td><dl>
<dt><b>Description</b></dt>
<dd>represents a precompiled SQL statement.
 </dd>
<dd><P>
 A SQL statement is pre-compiled and stored in a PreparedStatement object.
 This object can then be used to efficiently execute this statement multiple
 times.
 </P>
 <P>
 <B>
 Note:
 </B>
 The
 <code>setXXX</code>
 methods for setting IN parameter values
 must specify types that are compatible with the defined SQL type of
 the input parameter. For instance, if the IN parameter has SQL type
 Integer, then the method
 <a href="XParameters.html">XParameters</a>::<a href="XParameters.html#setInt">setInt()</a>
 should be used.
 </P>
 <p>
 If arbitrary parameter type conversions are required, the method
 <a href="XParameters.html">XParameters</a>::<a href="XParameters.html#setObject">setObject()</a>
 should be used with a target SQL type.
 </p>
 <p>
 Example of setting a parameter; <code>con</code> is an active connection.
 </dd>
<dt><b>Example</b></dt>
<dd>:StarBASIC
 <pre>
 pstmt = con.prepareStatement("UPDATE EMPLOYEES SET SALARY = ? WHERE ID = ?")
 pstmt.setDouble(1, 153833.00)
 pstmt.setLong(2, 110592)
 </pre>
 </p>
 <P>
 Only one
 <a href="ResultSet.html">ResultSet</a>
 per
 <a href="Statement.html">Statement</a>
 can be open at any point in
 time. Therefore, if the reading of one ResultSet is interleaved
 with the reading of another, each must have been generated by
 different Statements. All statement
 <code>execute</code>
 methods implicitly close a statement's current ResultSet if an open one exists.
 </p>
 </dd>
</dl>
</td>
</tr>
</table>
<hr>
<a name="InterfacesSummary"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle">
<tr>
<td class="subtitle" colspan="2">Exported Interfaces - Summary</td>
</tr>
<tr>
<td class="imsum_left">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/XComponent.html">XComponent</a></td>
<td class="imsum_right"><p>optional for implementation, controls the releasing of resources
 and the notification of registered listeners.
 (<a href="#XComponent">details</a>)</p>
</td>
</tr>
<tr>
<td class="imsum_left"><a href="XCloseable.html">XCloseable</a></td>
<td class="imsum_right"><p>freeing all resources of a statement. A related result set will be
 freed as well.
 </p>
</td>
</tr>
<tr>
<td class="imsum_left">::com::sun::star::<a href="../beans/module-ix.html">beans</a>::<a href="../beans/XPropertySet.html">XPropertySet</a></td>
<td class="imsum_right"><dl>
<dt>(referenced entity's summary:)</dt>
<dd>provides information about and access to the
 properties from an implementation.

 </dd>
</dl>
</td>
</tr>
<tr>
<td class="imsum_left">::com::sun::star::<a href="../util/module-ix.html">util</a>::<a href="../util/XCancellable.html">XCancellable</a></td>
<td class="imsum_right"><p>could be used for canceling the execution of SQL statements, if both
 the DBMS and the driver support aborting an SQL statement.
 The implementation is optional.
 (<a href="#XCancellable">details</a>)</p>
</td>
</tr>
<tr>
<td class="imsum_left"><a href="XPreparedStatement.html">XPreparedStatement</a></td>
<td class="imsum_right"><p>is the interface for executing SQL prepared commands.
 </p>
</td>
</tr>
<tr>
<td class="imsum_left"><a href="XResultSetMetaDataSupplier.html">XResultSetMetaDataSupplier</a></td>
<td class="imsum_right"><p>provides access to the description of the result set which would be generated by executing the
 <a href="PreparedStatement.html">PreparedStatement</a>.
 </p>
</td>
</tr>
<tr>
<td class="imsum_left"><a href="XParameters.html">XParameters</a></td>
<td class="imsum_right"><p>is used for setting parameters before execution of the precompiled
 statement.
 </p>
</td>
</tr>
<tr>
<td class="imsum_left"><a href="XPreparedBatchExecution.html">XPreparedBatchExecution</a></td>
<td class="imsum_right"><p>provides the ability of batch execution. This interface is optional
 for execution.
 (<a href="#XPreparedBatchExecution">details</a>)</p>
</td>
</tr>
<tr>
<td class="imsum_left"><a href="XWarningsSupplier.html">XWarningsSupplier</a></td>
<td class="imsum_right"><p>controls the chaining of warnings, which may occur on every call
 to the connected database. Chained warnings from previous calls will be
 cleared before processing a new call.
 </p>
</td>
</tr>
<tr>
<td class="imsum_left"><a href="XMultipleResults.html">XMultipleResults</a></td>
<td class="imsum_right"><p>covers the handling of multiple results after executing an SQL command.
 </p>
</td>
</tr>
</table>
<a name="PropertiesSummary"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle">
<tr>
<td class="subtitle" colspan="2">Properties' Summary</td>
</tr>
<tr>
<td class="imsum_left">long<br>
<a href="#QueryTimeOut">QueryTimeOut</a></td>
<td class="imsum_right">retrieves the number of seconds the driver will wait for a Statement
 to execute. If the limit is exceeded, a SQLException is thrown.
 There is no limitation, if set to zero.
 &nbsp;</td>
</tr>
<tr>
<td class="imsum_left">long<br>
<a href="#MaxFieldSize">MaxFieldSize</a></td>
<td class="imsum_right">returns the maximum number of bytes allowed for any column value.
 &nbsp;</td>
</tr>
<tr>
<td class="imsum_left">long<br>
<a href="#MaxRows">MaxRows</a></td>
<td class="imsum_right">retrieves the maximum number of rows that a ResultSet can contain.
 If the limit is exceeded, the excess rows are silently dropped.
 <br>There is no limitation, if set to zero.
 &nbsp;</td>
</tr>
<tr>
<td class="imsum_left">string<br>
<a href="#CursorName">CursorName</a></td>
<td class="imsum_right">defines the SQL cursor name that will be used by subsequent Statement
 <code>execute</code>
 methods.
 &nbsp;</td>
</tr>
<tr>
<td class="imsum_left">long<br>
<a href="#ResultSetConcurrency">ResultSetConcurrency</a></td>
<td class="imsum_right">retrieves the result set concurrency.
 &nbsp;</td>
</tr>
<tr>
<td class="imsum_left">long<br>
<a href="#ResultSetType">ResultSetType</a></td>
<td class="imsum_right">Determine the result set type.
 &nbsp;</td>
</tr>
<tr>
<td class="imsum_left">long<br>
<a href="#FetchDirection">FetchDirection</a></td>
<td class="imsum_right">retrieves the direction for fetching rows from database tables
 that is the default for result sets generated from this
 <code>Statement</code>
 object.
 &nbsp;</td>
</tr>
<tr>
<td class="imsum_left">long<br>
<a href="#FetchSize">FetchSize</a></td>
<td class="imsum_right">retrieves the number of result set rows that is the default fetch size
 for result sets generated from this
 <code>Statement</code>
 object.
 &nbsp;</td>
</tr>
</table>
<a name="InterfacesDetails"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle">
<tr>
<td class="subtitle" colspan="2">Exported Interfaces - Details</td>
</tr>
<tr/>
<tr>
<td class="imdetail"><a name="XComponent" class="membertitle">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/XComponent.html">XComponent</a></a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center">
<tr>
<td><dl>
<dt><b>Usage Restrictions</b></dt>
<dd><i>optional</i></dd>
<dt><b>Description</b></dt>
<dd>optional for implementation, controls the releasing of resources
 and the notification of registered listeners.
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr/>
<tr>
<td class="imdetail"><a name="XCloseable" class="membertitle"><a href="XCloseable.html">XCloseable</a></a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center">
<tr>
<td><dl>
<dt><b>Description</b></dt>
<dd>freeing all resources of a statement. A related result set will be
 freed as well.
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr/>
<tr>
<td class="imdetail"><a name="XPropertySet" class="membertitle">::com::sun::star::<a href="../beans/module-ix.html">beans</a>::<a href="../beans/XPropertySet.html">XPropertySet</a></a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center">
<tr>
<td><dl>
<dt>(referenced entity's summary:)</dt>
<dd>provides information about and access to the
 properties from an implementation.

 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr/>
<tr>
<td class="imdetail"><a name="XCancellable" class="membertitle">::com::sun::star::<a href="../util/module-ix.html">util</a>::<a href="../util/XCancellable.html">XCancellable</a></a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center">
<tr>
<td><dl>
<dt><b>Usage Restrictions</b></dt>
<dd><i>optional</i></dd>
<dt><b>Description</b></dt>
<dd>could be used for canceling the execution of SQL statements, if both
 the DBMS and the driver support aborting an SQL statement.
 The implementation is optional.
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr/>
<tr>
<td class="imdetail"><a name="XPreparedStatement" class="membertitle"><a href="XPreparedStatement.html">XPreparedStatement</a></a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center">
<tr>
<td><dl>
<dt><b>Description</b></dt>
<dd>is the interface for executing SQL prepared commands.
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr/>
<tr>
<td class="imdetail"><a name="XResultSetMetaDataSupplier" class="membertitle"><a href="XResultSetMetaDataSupplier.html">XResultSetMetaDataSupplier</a></a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center">
<tr>
<td><dl>
<dt><b>Description</b></dt>
<dd>provides access to the description of the result set which would be generated by executing the
 <a href="PreparedStatement.html">PreparedStatement</a>.
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr/>
<tr>
<td class="imdetail"><a name="XParameters" class="membertitle"><a href="XParameters.html">XParameters</a></a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center">
<tr>
<td><dl>
<dt><b>Description</b></dt>
<dd>is used for setting parameters before execution of the precompiled
 statement.
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr/>
<tr>
<td class="imdetail"><a name="XPreparedBatchExecution" class="membertitle"><a href="XPreparedBatchExecution.html">XPreparedBatchExecution</a></a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center">
<tr>
<td><dl>
<dt><b>Usage Restrictions</b></dt>
<dd><i>optional</i></dd>
<dt><b>Description</b></dt>
<dd>provides the ability of batch execution. This interface is optional
 for execution.
 </dd>
<dd><p>
 A driver implementing batch execution must return
 <b>true</b>
 for
 <a href="XDatabaseMetaData.html">XDatabaseMetaData</a>::<a href="XDatabaseMetaData.html#supportsBatchUpdates">supportsBatchUpdates()</a>
 </p>
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr/>
<tr>
<td class="imdetail"><a name="XWarningsSupplier" class="membertitle"><a href="XWarningsSupplier.html">XWarningsSupplier</a></a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center">
<tr>
<td><dl>
<dt><b>Description</b></dt>
<dd>controls the chaining of warnings, which may occur on every call
 to the connected database. Chained warnings from previous calls will be
 cleared before processing a new call.
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr/>
<tr>
<td class="imdetail"><a name="XMultipleResults" class="membertitle"><a href="XMultipleResults.html">XMultipleResults</a></a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center">
<tr>
<td><dl>
<dt><b>Description</b></dt>
<dd>covers the handling of multiple results after executing an SQL command.
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
</table>
<a name="PropertiesDetails"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle">
<tr>
<td class="subtitle">Properties' Details</td>
</tr>
<tr>
<td class="imdetail"><a name="QueryTimeOut" class="membertitle">QueryTimeOut</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center">
<tr>
<td>long <b>QueryTimeOut</b>;<hr>
<dl>
<dt><b>Description</b></dt>
<dd>retrieves the number of seconds the driver will wait for a Statement
 to execute. If the limit is exceeded, a SQLException is thrown.
 There is no limitation, if set to zero.
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="MaxFieldSize" class="membertitle">MaxFieldSize</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center">
<tr>
<td>long <b>MaxFieldSize</b>;<hr>
<dl>
<dt><b>Description</b></dt>
<dd>returns the maximum number of bytes allowed for any column value.
 </dd>
<dd><p>
 This limit is the maximum number of bytes that can be returned
 for any column value. The limit applies only to
 <a href="DataType.html">DataType</a>::<a href="DataType.html#BINARY">BINARY</a>
 ,
 <a href="DataType.html">DataType</a>::<a href="DataType.html#VARBINARY">VARBINARY</a>
 ,
 <a href="DataType.html">DataType</a>::<a href="DataType.html#LONGVARBINARY">LONGVARBINARY</a>
 ,
 <a href="DataType.html">DataType</a>::<a href="DataType.html#CHAR">CHAR</a>
 ,
 <a href="DataType.html">DataType</a>::<a href="DataType.html#VARCHAR">VARCHAR</a>
 ,
 and
 <a href="DataType.html">DataType</a>::<a href="DataType.html#LONGVARCHAR">LONGVARCHAR</a>
 columns.
 If the limit is exceeded, the excess data is silently discarded.
 </p>
 <p>
 There is no limitation, if set to zero.
 </p>
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="MaxRows" class="membertitle">MaxRows</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center">
<tr>
<td>long <b>MaxRows</b>;<hr>
<dl>
<dt><b>Description</b></dt>
<dd>retrieves the maximum number of rows that a ResultSet can contain.
 If the limit is exceeded, the excess rows are silently dropped.
 <br>There is no limitation, if set to zero.
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="CursorName" class="membertitle">CursorName</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center">
<tr>
<td>string <b>CursorName</b>;<hr>
<dl>
<dt><b>Description</b></dt>
<dd>defines the SQL cursor name that will be used by subsequent Statement
 <code>execute</code>
 methods.
 </dd>
<dd><p>
 This name can then be used in SQL positioned update/delete statements to
 identify the current row in the ResultSet generated by this statement. If
 the database does not support positioned update/delete, this property is
 a noop. To insure that a cursor has the proper isolation level to support
 updates, the cursor's SELECT statement should be of the form
 "select for update ...". If the "for update" phrase is omitted,
 positioned updates may fail.
 </p>
 <P>
 <B>
 Note:
 </B>
 By definition, positioned update/delete
 execution must be done by a different Statement than the one
 which generated the ResultSet being used for positioning. Also,
 cursor names must be unique within a connection.
 </p>
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="ResultSetConcurrency" class="membertitle">ResultSetConcurrency</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center">
<tr>
<td>long <b>ResultSetConcurrency</b>;<hr>
<dl>
<dt><b>Description</b></dt>
<dd>retrieves the result set concurrency.
 </dd>
<dt><b>See also</b></dt>
<dd><a href="ResultSetConcurrency.html">ResultSetConcurrency</a></dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="ResultSetType" class="membertitle">ResultSetType</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center">
<tr>
<td>long <b>ResultSetType</b>;<hr>
<dl>
<dt><b>Description</b></dt>
<dd>Determine the result set type.
 </dd>
<dt><b>See also</b></dt>
<dd><a href="ResultSetType.html">ResultSetType</a></dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="FetchDirection" class="membertitle">FetchDirection</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center">
<tr>
<td>long <b>FetchDirection</b>;<hr>
<dl>
<dt><b>Description</b></dt>
<dd>retrieves the direction for fetching rows from database tables
 that is the default for result sets generated from this
 <code>Statement</code>
 object.
 </dd>
<dd><p>
 If this
 <code>Statement</code>
 object has not set a fetch direction,
 the return value is implementation-specific.
 </p>
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="FetchSize" class="membertitle">FetchSize</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center">
<tr>
<td>long <b>FetchSize</b>;<hr>
<dl>
<dt><b>Description</b></dt>
<dd>retrieves the number of result set rows that is the default fetch size
 for result sets generated from this
 <code>Statement</code>
 object.
 </dd>
<dd><p>
 If this
 <code>Statement</code>
 object has not set a fetch size,
 the return value is implementation-specific.
 </p>
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br>&nbsp;<a href="#_top_">Top of Page</a><hr size="3"><p class="copyright" align="center">Copyright &copy; 2000, 2012 LibreOffice contributors and/or their affiliates. All rights reserved.</p><p class="copyright" align="center">LibreOffice was created by The Document Foundation, based on OpenOffice.org, which is Copyright 2000, 2010 Oracle and/or its affiliates.</p><p class="copyright" align="center">The Document Foundation acknowledges all community members, please find more info <a href="http://www.libreoffice.org/about-us/credits/" target="_blank">at our website</a>.<p>&nbsp;</p><p class="copyright" align="center"><a href="http://www.libreoffice.org/privacy" target="_blank">Privacy Policy</a> | <a href="http://www.libreoffice.org/imprint" target="_blank">Impressum (Legal Info)</a> | Copyright information: The source code of LibreOffice is licensed under the GNU Lesser General Public License (<a href="http://www.libreoffice.org/download/license/" target="_blank">LGPLv3</a>). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our <a href="http://wiki.documentfoundation.org/TradeMark_Policy" target="_blank">trademark policy</a>.</p>

</div> <!-- id="adc-idlref" -->
</body>

</html>