Class JDBCPreparedStatement
- java.lang.Object
-
- SQLite.JDBC2z.JDBCStatement
-
- SQLite.JDBC2z.JDBCPreparedStatement
-
- All Implemented Interfaces:
AutoCloseable,PreparedStatement,Statement,Wrapper
public class JDBCPreparedStatement extends JDBCStatement implements PreparedStatement
-
-
Field Summary
-
Fields inherited from class SQLite.JDBC2z.JDBCStatement
conn, maxrows, rs, updcnt
-
Fields inherited from interface java.sql.Statement
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO
-
-
Constructor Summary
Constructors Constructor Description JDBCPreparedStatement(JDBCConnection conn, String sql)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddBatch()Add a set of parameters to thePreparedStatement's command batch.voidclearBatch()Clears the current list of SQL commands for this statement.voidclearParameters()Clear the current parameter values.voidclose()Releases this statement's database and JDBC driver resources.booleanexecute()Executes the SQL statement in thisPreparedStatement.int[]executeBatch()Submits a batch of SQL commands to the database.ResultSetexecuteQuery()Executes the SQL query in thePreparedStatementand returns theResultSetgenerated by the query.intexecuteUpdate()Invokes the SQL command contained within the prepared statement.ArraygetArray(int parameterIndex)ArraygetArray(String parameterName)BigDecimalgetBigDecimal(String parameterName)BlobgetBlob(int parameterIndex)BlobgetBlob(String parameterName)booleangetBoolean(String parameterName)bytegetByte(String parameterName)byte[]getBytes(String parameterName)ClobgetClob(int parameterIndex)ClobgetClob(String parameterName)DategetDate(int parameterIndex, Calendar cal)DategetDate(String parameterName)DategetDate(String parameterName, Calendar cal)doublegetDouble(String parameterName)floatgetFloat(String parameterName)intgetInt(String parameterName)longgetLong(String parameterName)ResultSetMetaDatagetMetaData()Returns aResultSetMetaDatadescribing theResultSetthat would be produced by execution of thePreparedStatement.ObjectgetObject(int parameterIndex)ObjectgetObject(int parameterIndex, Map map)ObjectgetObject(String parameterName)ObjectgetObject(String parameterName, Map map)ParameterMetaDatagetParameterMetaData()Gets information about the parameters of thePreparedStatement.RefgetRef(int parameterIndex)RefgetRef(String parameterName)shortgetShort(String parameterName)StringgetString(String parameterName)TimegetTime(int parameterIndex, Calendar cal)TimegetTime(String parameterName)TimegetTime(String parameterName, Calendar cal)TimestampgetTimestamp(int parameterIndex, Calendar cal)TimestampgetTimestamp(String parameterName)TimestampgetTimestamp(String parameterName, Calendar cal)URLgetURL(int parameterIndex)URLgetURL(String parameterName)voidregisterOutputParameter(String parameterName, int sqlType)voidregisterOutputParameter(String parameterName, int sqlType, int scale)voidregisterOutputParameter(String parameterName, int sqlType, String typeName)voidsetArray(int i, Array x)Sets the value of a specified parameter to the suppliedArray.voidsetAsciiStream(int parameterIndex, InputStream x)Sets the value of the specified parameter to the bytes frominputStream.voidsetAsciiStream(int parameterIndex, InputStream x, int length)Sets the value of a specified parameter to the content of a suppliedInputStream, which has a specified number of bytes.voidsetAsciiStream(int parameterIndex, InputStream x, long len)Sets the value of the specified parameter to the nextlengthbytes frominputStream.voidsetAsciiStream(String parameterName, InputStream x)voidsetAsciiStream(String parameterName, InputStream s, int length)voidsetAsciiStream(String parameterName, InputStream x, long len)voidsetBigDecimal(int parameterIndex, BigDecimal x)Sets the value of a specified parameter to a suppliedjava.math.BigDecimalvalue.voidsetBigDecimal(String parameterName, BigDecimal val)voidsetBinaryStream(int parameterIndex, InputStream x)Sets the value of the specified parameter to the bytes frominputStream.voidsetBinaryStream(int parameterIndex, InputStream x, int length)Sets the value of a specified parameter to the content of a supplied binaryInputStream, which has a specified number of bytes.voidsetBinaryStream(int parameterIndex, InputStream x, long len)Sets the value of the specified parameter to the nextlengthbytes frominputStream.voidsetBinaryStream(String parameterName, InputStream x)voidsetBinaryStream(String parameterName, InputStream s, int length)voidsetBinaryStream(String parameterName, InputStream x, long len)voidsetBlob(int parameterIndex, InputStream x)Sets the value of the specified parameter to the bytes frominputStream.voidsetBlob(int parameterIndex, InputStream x, long len)Sets the value of the specified parameter to the nextlengthbytes frominputStream.voidsetBlob(int i, Blob x)Sets the value of a specified parameter to the givenBlobobject.voidsetBlob(String parameterName, InputStream x)voidsetBlob(String parameterName, InputStream x, long len)voidsetBoolean(int parameterIndex, boolean x)Sets the value of a specified parameter to a suppliedbooleanvalue.voidsetBoolean(String parameterName, boolean val)voidsetByte(int parameterIndex, byte x)Sets the value of a specified parameter to a suppliedbytevalue.voidsetByte(String parameterName, byte val)voidsetBytes(int parameterIndex, byte[] x)Sets the value of a specified parameter to a supplied array of bytes.voidsetBytes(String parameterName, byte[] val)voidsetCharacterStream(int parameterIndex, Reader x)Sets the value of the specified parameter to the characters fromreader.voidsetCharacterStream(int parameterIndex, Reader reader, int length)Sets the value of a specified parameter to the character content of aReaderobject, with the specified length of character data.voidsetCharacterStream(int parameterIndex, Reader x, long len)Sets the value of the specified parameter to the nextlengthcharacters fromreader.voidsetCharacterStream(String parameterName, Reader x)voidsetCharacterStream(String parameterName, Reader r, int length)voidsetCharacterStream(String parameterName, Reader x, long len)voidsetClob(int parameterIndex, Reader x)Sets the value of the specified parameter to the characters fromreader.voidsetClob(int parameterIndex, Reader x, long len)Sets the value of the specified parameter to the nextlengthcharacters fromreader.voidsetClob(int i, Clob x)Sets the value of a specified parameter to the givenClobobject.voidsetClob(String parameterName, Reader x)voidsetClob(String parameterName, Reader x, long len)voidsetDate(int parameterIndex, Date x)Sets the value of a specified parameter to a suppliedjava.sql.Datevalue.voidsetDate(int parameterIndex, Date x, Calendar cal)Sets the value of a specified parameter to a suppliedjava.sql.Datevalue, using a suppliedCalendarto map the Date.voidsetDate(String parameterName, Date val)voidsetDate(String parameterName, Date val, Calendar cal)voidsetDouble(int parameterIndex, double x)Sets the value of a specified parameter to a supplieddoublevalue.voidsetDouble(String parameterName, double val)voidsetFloat(int parameterIndex, float x)Sets the value of a specified parameter to to a suppliedfloatvalue.voidsetFloat(String parameterName, float val)voidsetInt(int parameterIndex, int x)Sets the value of a specified parameter to a suppliedintvalue.voidsetInt(String parameterName, int val)voidsetLong(int parameterIndex, long x)Sets the value of a specified parameter to a suppliedlongvalue.voidsetLong(String parameterName, long val)voidsetNCharacterStream(int parameterIndex, Reader x)Sets the value of the specified parameter to the characters fromreader.voidsetNCharacterStream(int parameterIndex, Reader x, long len)Sets the value of the specified parameter to the nextlengthcharacters fromreader.voidsetNCharacterStream(String parameterName, Reader x)voidsetNCharacterStream(String parameterName, Reader x, long len)voidsetNClob(int parameterIndex, Reader x)Sets the value of the specified parameter to the characters fromreader.voidsetNClob(int parameterIndex, Reader x, long len)Sets the value of the specified parameter to the nextlengthcharacters fromreader.voidsetNClob(int parameterIndex, NClob value)Sets the value of the specified parameter tovalue.voidsetNClob(String parameterName, Reader x)voidsetNClob(String parameterName, Reader x, long len)voidsetNClob(String parameterName, NClob value)voidsetNString(int parameterIndex, String value)Sets the value of a specified parameter to a supplied string.voidsetNString(String parameterName, String value)voidsetNull(int parameterIndex, int sqlType)Sets the value of a specified parameter to SQLNULL.voidsetNull(int parameterIndex, int sqlType, String typeName)Sets the value of a specified parameter to SQLNULL.voidsetNull(String parameterName, int sqlType)voidsetNull(String parameterName, int sqlType, String typeName)voidsetObject(int parameterIndex, Object x)Sets the value of a specified parameter using a supplied object.voidsetObject(int parameterIndex, Object x, int targetSqlType)Sets the value of a specified parameter using a supplied object.voidsetObject(int parameterIndex, Object x, int targetSqlType, int scale)Sets the value of a specified parameter using a supplied object.voidsetObject(String parameterName, Object val)voidsetObject(String parameterName, Object val, int targetSqlType)voidsetObject(String parameterName, Object val, int targetSqlType, int scale)voidsetRef(int i, Ref x)Sets the value of a specified parameter to a suppliedREF(<structured-type>)value.voidsetRowId(int parameterIndex, RowId x)Sets the value of a specified parameter to a suppliedjava.sql.RowId.voidsetRowId(String parameterName, RowId x)voidsetShort(int parameterIndex, short x)Sets the value of a specified parameter to a suppliedshortvalue.voidsetShort(String parameterName, short val)voidsetSQLXML(int parameterIndex, SQLXML xml)Sets the value of the specified parameter to the value ofxmlObject.voidsetSQLXML(String parameterName, SQLXML xml)voidsetString(int parameterIndex, String x)Sets the value of a specified parameter to a supplied string.voidsetString(String parameterName, String val)voidsetTime(int parameterIndex, Time x)Sets the value of a specified parameter to a suppliedjava.sql.Timevalue.voidsetTime(int parameterIndex, Time x, Calendar cal)Sets the value of a specified parameter to a suppliedjava.sql.Timevalue, using a suppliedCalendar.voidsetTime(String parameterName, Time val)voidsetTime(String parameterName, Time val, Calendar cal)voidsetTimestamp(int parameterIndex, Timestamp x)Sets the value of a specified parameter to a supplied java.sql.Timestamp value.voidsetTimestamp(int parameterIndex, Timestamp x, Calendar cal)Sets the value of a specified parameter to a suppliedjava.sql.Timestampvalue, using the suppliedCalendar.voidsetTimestamp(String parameterName, Timestamp val)voidsetTimestamp(String parameterName, Timestamp val, Calendar cal)voidsetUnicodeStream(int parameterIndex, InputStream x, int length)Deprecated.voidsetURL(int parameterIndex, URL url)Sets the value of a specified parameter to a suppliedjava.net.URL.-
Methods inherited from class SQLite.JDBC2z.JDBCStatement
addBatch, cancel, clearWarnings, execute, execute, execute, execute, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isPoolable, isWrapperFor, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout, unwrap
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.sql.Statement
addBatch, cancel, clearWarnings, execute, execute, execute, execute, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isPoolable, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout
-
Methods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
-
-
-
-
Constructor Detail
-
JDBCPreparedStatement
public JDBCPreparedStatement(JDBCConnection conn, String sql)
-
-
Method Detail
-
executeQuery
public ResultSet executeQuery() throws SQLException
Description copied from interface:PreparedStatementExecutes the SQL query in thePreparedStatementand returns theResultSetgenerated by the query.- Specified by:
executeQueryin interfacePreparedStatement- Returns:
- the
ResultSetgenerated by the query, nevernull. - Throws:
SQLException- if a database error happens or if the SQL statement does not produce aResultSet.
-
executeUpdate
public int executeUpdate() throws SQLExceptionDescription copied from interface:PreparedStatementInvokes the SQL command contained within the prepared statement. This must beINSERT,UPDATE,DELETE, or a command that returns nothing.- Specified by:
executeUpdatein interfacePreparedStatement- Returns:
- the number of affected rows for
INSERT,UPDATEorDELETEstatements,0for statements that return nothing. - Throws:
SQLException- if a database error happens or if the SQL statement returns aResultSet.
-
setNull
public void setNull(int parameterIndex, int sqlType) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of a specified parameter to SQLNULL. Don't use this version ofsetNullfor User Defined Types (UDT) or for REF type parameters.- Specified by:
setNullin interfacePreparedStatement- Parameters:
parameterIndex- the parameter number index, where the first parameter has index 1.sqlType- the SQL type of the parameter, as defined injava.sql.Types.- Throws:
SQLException- if a database error happens.
-
setBoolean
public void setBoolean(int parameterIndex, boolean x) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of a specified parameter to a suppliedbooleanvalue.- Specified by:
setBooleanin interfacePreparedStatement- Parameters:
parameterIndex- the parameter number index, where the first parameter has index 1.x- the boolean value to which the parameter atparameterIndexis set.- Throws:
SQLException- if a database error happens.
-
setByte
public void setByte(int parameterIndex, byte x) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of a specified parameter to a suppliedbytevalue.- Specified by:
setBytein interfacePreparedStatement- Parameters:
parameterIndex- the parameter number index, where the first parameter has index 1.x- the byte value to which the parameter atparameterIndexis set.- Throws:
SQLException- if a database error happens.
-
setShort
public void setShort(int parameterIndex, short x) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of a specified parameter to a suppliedshortvalue.- Specified by:
setShortin interfacePreparedStatement- Parameters:
parameterIndex- the parameter number index, where the first parameter has index 1.x- ashortvalue to which the parameter atparameterIndexis set.- Throws:
SQLException- if a database error happens.
-
setInt
public void setInt(int parameterIndex, int x) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of a specified parameter to a suppliedintvalue.- Specified by:
setIntin interfacePreparedStatement- Parameters:
parameterIndex- the parameter number index, where the first parameter has index 1.x- theintvalue to which the parameter atparameterIndexis set.- Throws:
SQLException- if a database error happens.
-
setLong
public void setLong(int parameterIndex, long x) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of a specified parameter to a suppliedlongvalue.- Specified by:
setLongin interfacePreparedStatement- Parameters:
parameterIndex- the parameter number index, where the first parameter has index 1.x- thelongvalue to which the parameter atparameterIndexis set.- Throws:
SQLException- if a database error happens.
-
setFloat
public void setFloat(int parameterIndex, float x) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of a specified parameter to to a suppliedfloatvalue.- Specified by:
setFloatin interfacePreparedStatement- Parameters:
parameterIndex- the parameter number index, where the first parameter has index 1.x- thefloatvalue to update the parameter.- Throws:
SQLException- if a database error happens.
-
setDouble
public void setDouble(int parameterIndex, double x) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of a specified parameter to a supplieddoublevalue.- Specified by:
setDoublein interfacePreparedStatement- Parameters:
parameterIndex- the parameter number index, where the first parameter has index 1.x- thedoublevalue to which the parameter atparameterIndexis set.- Throws:
SQLException- if a database error happens.
-
setBigDecimal
public void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of a specified parameter to a suppliedjava.math.BigDecimalvalue.- Specified by:
setBigDecimalin interfacePreparedStatement- Parameters:
parameterIndex- the parameter number index, where the first parameter has index 1.x- the value to which the parameter atparameterIndexis set.- Throws:
SQLException- if a database error happens.- See Also:
BigDecimal
-
setString
public void setString(int parameterIndex, String x) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of a specified parameter to a supplied string.- Specified by:
setStringin interfacePreparedStatement- Parameters:
parameterIndex- the parameter number index, where the first parameter has index 1.x- the value to which the parameter atparameterIndexis set.- Throws:
SQLException- if a database error happens.
-
setBytes
public void setBytes(int parameterIndex, byte[] x) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of a specified parameter to a supplied array of bytes. The array is mapped to aVARBINARYorLONGVARBINARYin the database.- Specified by:
setBytesin interfacePreparedStatement- Parameters:
parameterIndex- the parameter number index, where the first parameter has index 1.x- the array of bytes to which the parameter atparameterIndexis set.- Throws:
SQLException- if a database error happens.
-
setDate
public void setDate(int parameterIndex, Date x) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of a specified parameter to a suppliedjava.sql.Datevalue.- Specified by:
setDatein interfacePreparedStatement- Parameters:
parameterIndex- the parameter number index, where the first parameter has index 1.x- ajava.sql.Dateto which the parameter atparameterIndexis set.- Throws:
SQLException- if a database error happens.
-
setTime
public void setTime(int parameterIndex, Time x) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of a specified parameter to a suppliedjava.sql.Timevalue.- Specified by:
setTimein interfacePreparedStatement- Parameters:
parameterIndex- the parameter number index, where the first parameter has index 1.x- ajava.sql.Timevalue to which the parameter atparameterIndexis set.- Throws:
SQLException- if a database error happens.
-
setTimestamp
public void setTimestamp(int parameterIndex, Timestamp x) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of a specified parameter to a supplied java.sql.Timestamp value.- Specified by:
setTimestampin interfacePreparedStatement- Parameters:
parameterIndex- the parameter number index, where the first parameter has index 1.x- the java.sql.Timestamp value to which the parameter atparameterIndexis set.- Throws:
SQLException- if a database error happens.
-
setAsciiStream
public void setAsciiStream(int parameterIndex, InputStream x, int length) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of a specified parameter to the content of a suppliedInputStream, which has a specified number of bytes.This is a good method for setting an SQL
LONGVARCHARparameter where the length of the data is large. Data is read from theInputStreamuntil end-of-file is reached or the specified number of bytes is copied.- Specified by:
setAsciiStreamin interfacePreparedStatement- Parameters:
parameterIndex- the parameter number index, where the first parameter has index 1.x- the ASCIIInputStreamcarrying the data to which the parameter atparameterIndexis set.length- the number of bytes in theInputStreamto copy to the parameter.- Throws:
SQLException- if a database error happens.
-
setUnicodeStream
@Deprecated public void setUnicodeStream(int parameterIndex, InputStream x, int length) throws SQLException
Deprecated.Description copied from interface:PreparedStatementSets the value of a specified parameter to the characters from a suppliedInputStream, with a specified number of bytes.- Specified by:
setUnicodeStreamin interfacePreparedStatement- Parameters:
parameterIndex- the parameter number index, where the first parameter has index 1.x- theInputStreamwith the character data to which the parameter atparameterIndexis set.length- the number of bytes to read from theInputStream.- Throws:
SQLException- if a database error happens.
-
setBinaryStream
public void setBinaryStream(int parameterIndex, InputStream x, int length) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of a specified parameter to the content of a supplied binaryInputStream, which has a specified number of bytes.Use this method when a large amount of data needs to be set into a
LONGVARBINARYparameter.- Specified by:
setBinaryStreamin interfacePreparedStatement- Parameters:
parameterIndex- the parameter number index, where the first parameter has index 1.x- the binaryInputStreamcarrying the data to update the parameter.length- the number of bytes in theInputStreamto copy to the parameter.- Throws:
SQLException- if a database error happens.
-
clearParameters
public void clearParameters() throws SQLExceptionDescription copied from interface:PreparedStatementClear the current parameter values.Typically, parameter values are retained for multiple executions of the
Statement. Setting a parameter value replaces the previous value. This method clears the values for all parameters, releasing all resources used by those parameters.- Specified by:
clearParametersin interfacePreparedStatement- Throws:
SQLException- if a database error happens.
-
setObject
public void setObject(int parameterIndex, Object x, int targetSqlType, int scale) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of a specified parameter using a supplied object.The object is converted to the given
targetSqlTypebefore it is sent to the database. If the object has a custom mapping (its class implements the interfaceSQLData), the JDBC driver will call the methodSQLData.writeSQLto write it to the SQL data stream. If the object's class implementsRef,Blob,Clob,Struct, orArray, the driver will pass it to the database in the form of the relevant SQL type.- Specified by:
setObjectin interfacePreparedStatement- Parameters:
parameterIndex- the parameter index, where the first parameter has index 1.x- the Object containing the value to which the parameter atparameterIndexis set.targetSqlType- the SQL type to send to the database, as defined injava.sql.Types.scale- the number of digits after the decimal point - only applies to the typesjava.sql.Types.DECIMALandjava.sql.Types.NUMERIC- ignored for all other types.- Throws:
SQLException- if a database error happens.
-
setObject
public void setObject(int parameterIndex, Object x, int targetSqlType) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of a specified parameter using a supplied object.The object is converted to the given
targetSqlTypebefore it is sent to the database. If the object has a custom mapping (its class implements the interfaceSQLData), the JDBC driver will call the methodSQLData.writeSQLto write it to the SQL data stream. If the object's class implementsRef,Blob,Clob,Struct, orArray, the driver will pass it to the database in the form of the relevant SQL type.- Specified by:
setObjectin interfacePreparedStatement- Parameters:
parameterIndex- the parameter index, where the first parameter has index 1.x- the Object containing the value to which the parameter atparameterIndexis set.targetSqlType- the SQL type to send to the database, as defined injava.sql.Types.- Throws:
SQLException- if a database error happens.
-
setObject
public void setObject(int parameterIndex, Object x) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of a specified parameter using a supplied object.There is a standard mapping from Java types to SQL types, defined in the JDBC specification. The passed object is then transformed into the appropriate SQL type, and then transferred to the database.
setObjectcan be used to pass abstract data types unique to the database, by using a JDBC driver specific Java type. If the object's class implements the interfaceSQLData, the JDBC driver callsSQLData.writeSQLto write it to the SQL data stream. If the object's class implementsRef,Blob,Clob,Struct, orArray, the driver passes it to the database as a value of the corresponding SQL type.- Specified by:
setObjectin interfacePreparedStatement- Parameters:
parameterIndex- the parameter number index, where the first parameter has index 1.x- the object containing the value to which the parameter atparameterIndexis set.- Throws:
SQLException- if a database error happens.
-
execute
public boolean execute() throws SQLExceptionDescription copied from interface:PreparedStatementExecutes the SQL statement in thisPreparedStatement.A
PreparedStatementmay return multiple results. The execute method executes thePreparedStatementand returns a flag indicating the kind of result produced by the action. The methodsgetResultSetorgetUpdateCountare used to retrieve the first result, and the second and subsequent results are retrieved withgetMoreResults.- Specified by:
executein interfacePreparedStatement- Returns:
trueif the result of the execution is aResultSet,falseif there is no result or if the result is an update count.- Throws:
SQLException- if a database error happens.
-
addBatch
public void addBatch() throws SQLExceptionDescription copied from interface:PreparedStatementAdd a set of parameters to thePreparedStatement's command batch.- Specified by:
addBatchin interfacePreparedStatement- Throws:
SQLException- if a database error happens.
-
executeBatch
public int[] executeBatch() throws SQLExceptionDescription copied from interface:StatementSubmits a batch of SQL commands to the database. Returns an array of update counts, if all the commands execute successfully.If one of the commands in the batch fails, this method can throw a
BatchUpdateExceptionand the JDBC driver may or may not process the remaining commands. The JDBC driver must behave consistently with the underlying database, following the "all or nothing" principle. If the driver continues processing, the array of results returned contains the same number of elements as there are commands in the batch, with a minimum of one of the elements having theEXECUTE_FAILEDvalue.- Specified by:
executeBatchin interfaceStatement- Overrides:
executeBatchin classJDBCStatement- Returns:
- an array of update counts, with one entry for each command in the
batch. The elements are ordered according to the order in which
the commands were added to the batch.
- If the value of an element is ≥ 0, the corresponding command completed successfully and the value is the update count (the number of rows in the database affected by the command) for that command.
- If the value is
SUCCESS_NO_INFO, the command completed successfully but the number of rows affected is unknown. - If the value is
EXECUTE_FAILED, the command failed.
- Throws:
SQLException- if an error occurs accessing the database.
-
clearBatch
public void clearBatch() throws SQLExceptionDescription copied from interface:StatementClears the current list of SQL commands for this statement.- Specified by:
clearBatchin interfaceStatement- Overrides:
clearBatchin classJDBCStatement- Throws:
SQLException- if an error occurs accessing the database or the database does not support batch updates.
-
close
public void close() throws SQLExceptionDescription copied from interface:StatementReleases this statement's database and JDBC driver resources.Using this method to release these resources as soon as possible is strongly recommended.
One should not rely on the resources being automatically released when finalized during garbage collection. Doing so can result in unpredictable behavior for the application.
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceStatement- Overrides:
closein classJDBCStatement- Throws:
SQLException- if an error occurs accessing the database.
-
setCharacterStream
public void setCharacterStream(int parameterIndex, Reader reader, int length) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of a specified parameter to the character content of aReaderobject, with the specified length of character data.Data is read from the
Readeruntil end-of-file is reached or the specified number of characters are copied.- Specified by:
setCharacterStreamin interfacePreparedStatement- Parameters:
parameterIndex- the parameter number index, where the first parameter has index 1reader- thejava.io.Readercontaining the character data.length- the number of characters to be read.- Throws:
SQLException- if a database error happens.
-
setRef
public void setRef(int i, Ref x) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of a specified parameter to a suppliedREF(<structured-type>)value. This is stored as an SQLREF.- Specified by:
setRefin interfacePreparedStatement- Parameters:
i- the parameter number index, where the first parameter has index 1.x- ajava.sql.Refvalue to which the parameter atparameterIndexis set.- Throws:
SQLException- if a database error happens.- See Also:
Ref
-
setBlob
public void setBlob(int i, Blob x) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of a specified parameter to the givenBlobobject.- Specified by:
setBlobin interfacePreparedStatement- Parameters:
i- the parameter number index, where the first parameter has index 1.x- thejava.sql.Blobto which the parameter atparameterIndexis set.- Throws:
SQLException- if a database error happens.- See Also:
Blob
-
setClob
public void setClob(int i, Clob x) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of a specified parameter to the givenClobobject.- Specified by:
setClobin interfacePreparedStatement- Parameters:
i- the parameter number index, where the first parameter has index 1.x- ajava.sql.Clobholding the data to which the parameter atparameterIndexis set.- Throws:
SQLException- if a database error happens.
-
setArray
public void setArray(int i, Array x) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of a specified parameter to the suppliedArray.- Specified by:
setArrayin interfacePreparedStatement- Parameters:
i- the parameter number index, where the first parameter has index 1.x- ajava.sql.Arraygiving the new value of the parameter atparameterIndex.- Throws:
SQLException- if a database error happens.- See Also:
Array
-
getMetaData
public ResultSetMetaData getMetaData() throws SQLException
Description copied from interface:PreparedStatementReturns aResultSetMetaDatadescribing theResultSetthat would be produced by execution of thePreparedStatement.It is possible to know the metadata for the
ResultSetwithout executing thePreparedStatement, because thePreparedStatementis precompiled. As a result the metadata can be queried ahead of time without actually executing the statement.- Specified by:
getMetaDatain interfacePreparedStatement- Returns:
- a
ResultSetMetaDataobject with the information about the columns of theResultSet, if the driver can return aResultSetMetaData.nullotherwise. - Throws:
SQLException- if there is a database error.
-
setDate
public void setDate(int parameterIndex, Date x, Calendar cal) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of a specified parameter to a suppliedjava.sql.Datevalue, using a suppliedCalendarto map the Date. TheCalendarallows the application to control the timezone used to compute the SQLDATEin the database - without the suppliedCalendar, the driver uses the VM defaults. See "Be wary of the default locale".- Specified by:
setDatein interfacePreparedStatement- Parameters:
parameterIndex- the parameter number index, where the first parameter has index 1.x- ajava.sql.Dateto which the parameter atparameterIndexis set.cal- aCalendarto use to construct the SQLDATEvalue.- Throws:
SQLException- if a database error happens.- See Also:
Date,Calendar
-
setTime
public void setTime(int parameterIndex, Time x, Calendar cal) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of a specified parameter to a suppliedjava.sql.Timevalue, using a suppliedCalendar.The driver uses the supplied
Calendarto create the SQLTIMEvalue, which allows it to use a custom timezone - otherwise the driver uses the VM defaults. See "Be wary of the default locale".- Specified by:
setTimein interfacePreparedStatement- Parameters:
parameterIndex- the parameter number index, where the first parameter has index 1.x- ajava.sql.Timevalue to which the parameter atparameterIndexis set.cal- aCalendarto use to construct the SQLTIMEvalue.- Throws:
SQLException- if a database error happens.- See Also:
Time,Calendar
-
setTimestamp
public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of a specified parameter to a suppliedjava.sql.Timestampvalue, using the suppliedCalendar.The driver uses the supplied
Calendarto create the SQLTIMESTAMPvalue, which allows it to use a custom timezone - otherwise the driver uses the VM defaults. See "Be wary of the default locale".- Specified by:
setTimestampin interfacePreparedStatement- Parameters:
parameterIndex- the parameter number index, where the first parameter has index 1.x- thejava.sql.Timestampvalue to which the parameter atparameterIndexis set.cal- aCalendarto use to construct the SQLTIMESTAMPvalue- Throws:
SQLException- if a database error happens.- See Also:
Timestamp,Calendar
-
setNull
public void setNull(int parameterIndex, int sqlType, String typeName) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of a specified parameter to SQLNULL. This version ofsetNullshould be used for User Defined Types (UDTs) and also REF types. UDTs can beSTRUCT,DISTINCT,JAVA_OBJECTand named array types.Applications must provide the SQL type code and also a fully qualified SQL type name when supplying a
NULLUDT or REF. For a UDT, the type name is the type name of the parameter itself, but for a REF parameter the type name is the type name of the referenced type.- Specified by:
setNullin interfacePreparedStatement- Parameters:
parameterIndex- the parameter number index, where the first parameter has index 1.sqlType- the SQL type of the parameter, as defined injava.sql.Types.typeName- the fully qualified name of a UDT or REF type - ignored if the parameter is not a UDT.- Throws:
SQLException- if a database error happens.- See Also:
Types
-
getParameterMetaData
public ParameterMetaData getParameterMetaData() throws SQLException
Description copied from interface:PreparedStatementGets information about the parameters of thePreparedStatement.- Specified by:
getParameterMetaDatain interfacePreparedStatement- Returns:
- a
ParameterMetaDataobject which holds information about the number, type, and properties of the parameters of thisPreparedStatement. - Throws:
SQLException- if a database error happens.
-
registerOutputParameter
public void registerOutputParameter(String parameterName, int sqlType) throws SQLException
- Throws:
SQLException
-
registerOutputParameter
public void registerOutputParameter(String parameterName, int sqlType, int scale) throws SQLException
- Throws:
SQLException
-
registerOutputParameter
public void registerOutputParameter(String parameterName, int sqlType, String typeName) throws SQLException
- Throws:
SQLException
-
getURL
public URL getURL(int parameterIndex) throws SQLException
- Throws:
SQLException
-
setURL
public void setURL(int parameterIndex, URL url) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of a specified parameter to a suppliedjava.net.URL.- Specified by:
setURLin interfacePreparedStatement- Parameters:
parameterIndex- the parameter number index, where the first parameter has index 1.url- theURLto which the parameter atparameterIndexis set.- Throws:
SQLException- if a database error happens.- See Also:
URL
-
setNull
public void setNull(String parameterName, int sqlType) throws SQLException
- Throws:
SQLException
-
setBoolean
public void setBoolean(String parameterName, boolean val) throws SQLException
- Throws:
SQLException
-
setByte
public void setByte(String parameterName, byte val) throws SQLException
- Throws:
SQLException
-
setShort
public void setShort(String parameterName, short val) throws SQLException
- Throws:
SQLException
-
setInt
public void setInt(String parameterName, int val) throws SQLException
- Throws:
SQLException
-
setLong
public void setLong(String parameterName, long val) throws SQLException
- Throws:
SQLException
-
setFloat
public void setFloat(String parameterName, float val) throws SQLException
- Throws:
SQLException
-
setDouble
public void setDouble(String parameterName, double val) throws SQLException
- Throws:
SQLException
-
setBigDecimal
public void setBigDecimal(String parameterName, BigDecimal val) throws SQLException
- Throws:
SQLException
-
setString
public void setString(String parameterName, String val) throws SQLException
- Throws:
SQLException
-
setBytes
public void setBytes(String parameterName, byte[] val) throws SQLException
- Throws:
SQLException
-
setDate
public void setDate(String parameterName, Date val) throws SQLException
- Throws:
SQLException
-
setTime
public void setTime(String parameterName, Time val) throws SQLException
- Throws:
SQLException
-
setTimestamp
public void setTimestamp(String parameterName, Timestamp val) throws SQLException
- Throws:
SQLException
-
setAsciiStream
public void setAsciiStream(String parameterName, InputStream s, int length) throws SQLException
- Throws:
SQLException
-
setBinaryStream
public void setBinaryStream(String parameterName, InputStream s, int length) throws SQLException
- Throws:
SQLException
-
setObject
public void setObject(String parameterName, Object val, int targetSqlType, int scale) throws SQLException
- Throws:
SQLException
-
setObject
public void setObject(String parameterName, Object val, int targetSqlType) throws SQLException
- Throws:
SQLException
-
setObject
public void setObject(String parameterName, Object val) throws SQLException
- Throws:
SQLException
-
setCharacterStream
public void setCharacterStream(String parameterName, Reader r, int length) throws SQLException
- Throws:
SQLException
-
setDate
public void setDate(String parameterName, Date val, Calendar cal) throws SQLException
- Throws:
SQLException
-
setTime
public void setTime(String parameterName, Time val, Calendar cal) throws SQLException
- Throws:
SQLException
-
setTimestamp
public void setTimestamp(String parameterName, Timestamp val, Calendar cal) throws SQLException
- Throws:
SQLException
-
setNull
public void setNull(String parameterName, int sqlType, String typeName) throws SQLException
- Throws:
SQLException
-
getString
public String getString(String parameterName) throws SQLException
- Throws:
SQLException
-
getBoolean
public boolean getBoolean(String parameterName) throws SQLException
- Throws:
SQLException
-
getByte
public byte getByte(String parameterName) throws SQLException
- Throws:
SQLException
-
getShort
public short getShort(String parameterName) throws SQLException
- Throws:
SQLException
-
getInt
public int getInt(String parameterName) throws SQLException
- Throws:
SQLException
-
getLong
public long getLong(String parameterName) throws SQLException
- Throws:
SQLException
-
getFloat
public float getFloat(String parameterName) throws SQLException
- Throws:
SQLException
-
getDouble
public double getDouble(String parameterName) throws SQLException
- Throws:
SQLException
-
getBytes
public byte[] getBytes(String parameterName) throws SQLException
- Throws:
SQLException
-
getDate
public Date getDate(String parameterName) throws SQLException
- Throws:
SQLException
-
getTime
public Time getTime(String parameterName) throws SQLException
- Throws:
SQLException
-
getTimestamp
public Timestamp getTimestamp(String parameterName) throws SQLException
- Throws:
SQLException
-
getObject
public Object getObject(String parameterName) throws SQLException
- Throws:
SQLException
-
getObject
public Object getObject(int parameterIndex) throws SQLException
- Throws:
SQLException
-
getBigDecimal
public BigDecimal getBigDecimal(String parameterName) throws SQLException
- Throws:
SQLException
-
getObject
public Object getObject(String parameterName, Map map) throws SQLException
- Throws:
SQLException
-
getObject
public Object getObject(int parameterIndex, Map map) throws SQLException
- Throws:
SQLException
-
getRef
public Ref getRef(int parameterIndex) throws SQLException
- Throws:
SQLException
-
getRef
public Ref getRef(String parameterName) throws SQLException
- Throws:
SQLException
-
getBlob
public Blob getBlob(String parameterName) throws SQLException
- Throws:
SQLException
-
getBlob
public Blob getBlob(int parameterIndex) throws SQLException
- Throws:
SQLException
-
getClob
public Clob getClob(String parameterName) throws SQLException
- Throws:
SQLException
-
getClob
public Clob getClob(int parameterIndex) throws SQLException
- Throws:
SQLException
-
getArray
public Array getArray(String parameterName) throws SQLException
- Throws:
SQLException
-
getArray
public Array getArray(int parameterIndex) throws SQLException
- Throws:
SQLException
-
getDate
public Date getDate(String parameterName, Calendar cal) throws SQLException
- Throws:
SQLException
-
getDate
public Date getDate(int parameterIndex, Calendar cal) throws SQLException
- Throws:
SQLException
-
getTime
public Time getTime(String parameterName, Calendar cal) throws SQLException
- Throws:
SQLException
-
getTime
public Time getTime(int parameterIndex, Calendar cal) throws SQLException
- Throws:
SQLException
-
getTimestamp
public Timestamp getTimestamp(String parameterName, Calendar cal) throws SQLException
- Throws:
SQLException
-
getTimestamp
public Timestamp getTimestamp(int parameterIndex, Calendar cal) throws SQLException
- Throws:
SQLException
-
getURL
public URL getURL(String parameterName) throws SQLException
- Throws:
SQLException
-
setRowId
public void setRowId(int parameterIndex, RowId x) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of a specified parameter to a suppliedjava.sql.RowId.- Specified by:
setRowIdin interfacePreparedStatement- Parameters:
parameterIndex- the parameter number index, where the first parameter has index 1.x- theRowIdto which the parameter atparameterIndexis set.- Throws:
SQLException- if a database error happens.
-
setRowId
public void setRowId(String parameterName, RowId x) throws SQLException
- Throws:
SQLException
-
setNString
public void setNString(int parameterIndex, String value) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of a specified parameter to a supplied string.- Specified by:
setNStringin interfacePreparedStatement- Parameters:
parameterIndex- the parameter number index, where the first parameter has index 1.value- theStringto which the parameter atparameterIndexis set.- Throws:
SQLException- if a database error happens.
-
setNString
public void setNString(String parameterName, String value) throws SQLException
- Throws:
SQLException
-
setNCharacterStream
public void setNCharacterStream(int parameterIndex, Reader x, long len) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of the specified parameter to the nextlengthcharacters fromreader.- Specified by:
setNCharacterStreamin interfacePreparedStatement- Parameters:
parameterIndex- the parameter number index, where the first parameter has index 1.x- theReaderlen- character count- Throws:
SQLException- if a database error happens.
-
setNCharacterStream
public void setNCharacterStream(String parameterName, Reader x, long len) throws SQLException
- Throws:
SQLException
-
setNClob
public void setNClob(int parameterIndex, NClob value) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of the specified parameter tovalue.- Specified by:
setNClobin interfacePreparedStatement- Parameters:
parameterIndex- the parameter number index, where the first parameter has index 1.value- theNClobto which the parameter atparameterIndexis set.- Throws:
SQLException- if a database error happens.
-
setNClob
public void setNClob(String parameterName, NClob value) throws SQLException
- Throws:
SQLException
-
setClob
public void setClob(int parameterIndex, Reader x, long len) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of the specified parameter to the nextlengthcharacters fromreader.- Specified by:
setClobin interfacePreparedStatement- Parameters:
parameterIndex- the parameter number index, where the first parameter has index 1.x- theReaderlen- character count- Throws:
SQLException- if a database error happens.
-
setClob
public void setClob(String parameterName, Reader x, long len) throws SQLException
- Throws:
SQLException
-
setBlob
public void setBlob(int parameterIndex, InputStream x, long len) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of the specified parameter to the nextlengthbytes frominputStream.- Specified by:
setBlobin interfacePreparedStatement- Parameters:
parameterIndex- the parameter number index, where the first parameter has index 1.x- theInputStreamlen- character count- Throws:
SQLException- if a database error happens.
-
setBlob
public void setBlob(String parameterName, InputStream x, long len) throws SQLException
- Throws:
SQLException
-
setNClob
public void setNClob(int parameterIndex, Reader x, long len) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of the specified parameter to the nextlengthcharacters fromreader.- Specified by:
setNClobin interfacePreparedStatement- Parameters:
parameterIndex- the parameter number index, where the first parameter has index 1.x- theReaderlen- character count- Throws:
SQLException- if a database error happens.
-
setNClob
public void setNClob(String parameterName, Reader x, long len) throws SQLException
- Throws:
SQLException
-
setSQLXML
public void setSQLXML(int parameterIndex, SQLXML xml) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of the specified parameter to the value ofxmlObject.- Specified by:
setSQLXMLin interfacePreparedStatement- Parameters:
parameterIndex- the parameter number index, where the first parameter has index 1.xml- theSQLXML- Throws:
SQLException- if a database error happens.
-
setSQLXML
public void setSQLXML(String parameterName, SQLXML xml) throws SQLException
- Throws:
SQLException
-
setAsciiStream
public void setAsciiStream(int parameterIndex, InputStream x, long len) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of the specified parameter to the nextlengthbytes frominputStream.- Specified by:
setAsciiStreamin interfacePreparedStatement- Parameters:
parameterIndex- the parameter number index, where the first parameter has index 1.x- theInputStreamlen- character count- Throws:
SQLException- if a database error happens.
-
setAsciiStream
public void setAsciiStream(String parameterName, InputStream x, long len) throws SQLException
- Throws:
SQLException
-
setBinaryStream
public void setBinaryStream(int parameterIndex, InputStream x, long len) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of the specified parameter to the nextlengthbytes frominputStream.- Specified by:
setBinaryStreamin interfacePreparedStatement- Parameters:
parameterIndex- the parameter number index, where the first parameter has index 1.x- theInputStreamlen- character count- Throws:
SQLException- if a database error happens.
-
setBinaryStream
public void setBinaryStream(String parameterName, InputStream x, long len) throws SQLException
- Throws:
SQLException
-
setCharacterStream
public void setCharacterStream(int parameterIndex, Reader x, long len) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of the specified parameter to the nextlengthcharacters fromreader.- Specified by:
setCharacterStreamin interfacePreparedStatement- Parameters:
parameterIndex- the parameter number index, where the first parameter has index 1.x- theReaderlen- character count- Throws:
SQLException- if a database error happens.
-
setCharacterStream
public void setCharacterStream(String parameterName, Reader x, long len) throws SQLException
- Throws:
SQLException
-
setAsciiStream
public void setAsciiStream(int parameterIndex, InputStream x) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of the specified parameter to the bytes frominputStream.- Specified by:
setAsciiStreamin interfacePreparedStatement- Parameters:
parameterIndex- the parameter number index, where the first parameter has index 1.x- theInputStream- Throws:
SQLException- if a database error happens.
-
setAsciiStream
public void setAsciiStream(String parameterName, InputStream x) throws SQLException
- Throws:
SQLException
-
setBinaryStream
public void setBinaryStream(int parameterIndex, InputStream x) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of the specified parameter to the bytes frominputStream.- Specified by:
setBinaryStreamin interfacePreparedStatement- Parameters:
parameterIndex- the parameter number index, where the first parameter has index 1.x- theInputStream- Throws:
SQLException- if a database error happens.
-
setBinaryStream
public void setBinaryStream(String parameterName, InputStream x) throws SQLException
- Throws:
SQLException
-
setCharacterStream
public void setCharacterStream(int parameterIndex, Reader x) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of the specified parameter to the characters fromreader.- Specified by:
setCharacterStreamin interfacePreparedStatement- Parameters:
parameterIndex- the parameter number index, where the first parameter has index 1.x- theReader- Throws:
SQLException- if a database error happens.
-
setCharacterStream
public void setCharacterStream(String parameterName, Reader x) throws SQLException
- Throws:
SQLException
-
setNCharacterStream
public void setNCharacterStream(int parameterIndex, Reader x) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of the specified parameter to the characters fromreader.- Specified by:
setNCharacterStreamin interfacePreparedStatement- Parameters:
parameterIndex- the parameter number index, where the first parameter has index 1.x- theReader- Throws:
SQLException- if a database error happens.
-
setNCharacterStream
public void setNCharacterStream(String parameterName, Reader x) throws SQLException
- Throws:
SQLException
-
setClob
public void setClob(int parameterIndex, Reader x) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of the specified parameter to the characters fromreader.- Specified by:
setClobin interfacePreparedStatement- Parameters:
parameterIndex- the parameter number index, where the first parameter has index 1.x- theReader- Throws:
SQLException- if a database error happens.
-
setClob
public void setClob(String parameterName, Reader x) throws SQLException
- Throws:
SQLException
-
setBlob
public void setBlob(int parameterIndex, InputStream x) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of the specified parameter to the bytes frominputStream.- Specified by:
setBlobin interfacePreparedStatement- Parameters:
parameterIndex- the parameter number index, where the first parameter has index 1.x- theInputStream- Throws:
SQLException- if a database error happens.
-
setBlob
public void setBlob(String parameterName, InputStream x) throws SQLException
- Throws:
SQLException
-
setNClob
public void setNClob(int parameterIndex, Reader x) throws SQLExceptionDescription copied from interface:PreparedStatementSets the value of the specified parameter to the characters fromreader.- Specified by:
setNClobin interfacePreparedStatement- Parameters:
parameterIndex- the parameter number index, where the first parameter has index 1.x- theReader- Throws:
SQLException- if a database error happens.
-
setNClob
public void setNClob(String parameterName, Reader x) throws SQLException
- Throws:
SQLException
-
-