Java java.sql PreparedStatement fields, constructors, methods, implement or subclass

Example usage for Java java.sql PreparedStatement fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.sql PreparedStatement.

The text is from its open source code.

Implementation

java.sql.PreparedStatement has the following implementations.
Click this link to see all its implementation.

Method

voidaddBatch()
Adds a set of parameters to this PreparedStatement object's batch of commands.
voidaddBatch(String sql)
Adds the given SQL command to the current list of commands for this Statement object.
voidcancel()
Cancels this Statement object if both the DBMS and driver support aborting an SQL statement.
voidclearBatch()
Empties this Statement object's current list of SQL commands.
voidclearParameters()
Clears the current parameter values immediately.
voidclearWarnings()
Clears all the warnings reported on this Statement object.
voidclose()
Releases this Statement object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed.
booleanexecute()
Executes the SQL statement in this PreparedStatement object, which may be any kind of SQL statement.
booleanexecute(String sql)
Executes the given SQL statement, which may return multiple results.
int[]executeBatch()
Submits a batch of commands to the database for execution and if all commands execute successfully, returns an array of update counts.
ResultSetexecuteQuery()
Executes the SQL query in this PreparedStatement object and returns the ResultSet object generated by the query.
ResultSetexecuteQuery(String sql)
Executes the given SQL statement, which returns a single ResultSet object.
intexecuteUpdate()
Executes the SQL statement in this PreparedStatement object, which must be an SQL Data Manipulation Language (DML) statement, such as INSERT, UPDATE or DELETE; or an SQL statement that returns nothing, such as a DDL statement.
intexecuteUpdate(String sql)
Executes the given SQL statement, which may be an INSERT, UPDATE, or DELETE statement or an SQL statement that returns nothing, such as an SQL DDL statement.
ClassgetClass()
Returns the runtime class of this Object .
ConnectiongetConnection()
Retrieves the Connection object that produced this Statement object.
ResultSetgetGeneratedKeys()
Retrieves any auto-generated keys created as a result of executing this Statement object.
intgetMaxRows()
Retrieves the maximum number of rows that a ResultSet object produced by this Statement object can contain.
ResultSetMetaDatagetMetaData()
Retrieves a ResultSetMetaData object that contains information about the columns of the ResultSet object that will be returned when this PreparedStatement object is executed.
booleangetMoreResults()
Moves to this Statement object's next result, returns true if it is a ResultSet object, and implicitly closes any current ResultSet object(s) obtained with the method getResultSet.
ParameterMetaDatagetParameterMetaData()
Retrieves the number, types and properties of this PreparedStatement object's parameters.
intgetQueryTimeout()
Retrieves the number of seconds the driver will wait for a Statement object to execute.
ResultSetgetResultSet()
Retrieves the current result as a ResultSet object.
intgetUpdateCount()
Retrieves the current result as an update count; if the result is a ResultSet object or there are no more results, -1 is returned.
SQLWarninggetWarnings()
Retrieves the first warning reported by calls on this Statement object.
booleanisClosed()
Retrieves whether this Statement object has been closed.
voidsetArray(int parameterIndex, Array x)
Sets the designated parameter to the given java.sql.Array object.
voidsetAsciiStream(int parameterIndex, java.io.InputStream x, int length)
Sets the designated parameter to the given input stream, which will have the specified number of bytes.
voidsetAsciiStream(int parameterIndex, java.io.InputStream x, long length)
Sets the designated parameter to the given input stream, which will have the specified number of bytes.
voidsetBigDecimal(int parameterIndex, BigDecimal x)
Sets the designated parameter to the given java.math.BigDecimal value.
voidsetBinaryStream(int parameterIndex, java.io.InputStream x, int length)
Sets the designated parameter to the given input stream, which will have the specified number of bytes.
voidsetBinaryStream(int parameterIndex, java.io.InputStream x, long length)
Sets the designated parameter to the given input stream, which will have the specified number of bytes.
voidsetBinaryStream(int parameterIndex, java.io.InputStream x)
Sets the designated parameter to the given input stream.
voidsetBlob(int parameterIndex, Blob x)
Sets the designated parameter to the given java.sql.Blob object.
voidsetBlob(int parameterIndex, InputStream inputStream)
Sets the designated parameter to a InputStream object.
voidsetBlob(int parameterIndex, InputStream inputStream, long length)
Sets the designated parameter to a InputStream object.
voidsetBoolean(int parameterIndex, boolean x)
Sets the designated parameter to the given Java boolean value.
voidsetByte(int parameterIndex, byte x)
Sets the designated parameter to the given Java byte value.
voidsetBytes(int parameterIndex, byte x[])
Sets the designated parameter to the given Java array of bytes.
voidsetCharacterStream(int parameterIndex, java.io.Reader reader)
Sets the designated parameter to the given Reader object.
voidsetCharacterStream(int parameterIndex, java.io.Reader reader, int length)
Sets the designated parameter to the given Reader object, which is the given number of characters long.
voidsetCharacterStream(int parameterIndex, java.io.Reader reader, long length)
Sets the designated parameter to the given Reader object, which is the given number of characters long.
voidsetClob(int parameterIndex, Clob x)
Sets the designated parameter to the given java.sql.Clob object.
voidsetClob(int parameterIndex, Reader reader)
Sets the designated parameter to a Reader object.
voidsetClob(int parameterIndex, Reader reader, long length)
Sets the designated parameter to a Reader object.
voidsetDate(int parameterIndex, java.sql.Date x)
Sets the designated parameter to the given java.sql.Date value using the default time zone of the virtual machine that is running the application.
voidsetDate(int parameterIndex, java.sql.Date x, Calendar cal)
Sets the designated parameter to the given java.sql.Date value, using the given Calendar object.
voidsetDouble(int parameterIndex, double x)
Sets the designated parameter to the given Java double value.
voidsetEscapeProcessing(boolean enable)
Sets escape processing on or off.
voidsetFetchDirection(int direction)
Gives the driver a hint as to the direction in which rows will be processed in ResultSet objects created using this Statement object.
voidsetFetchSize(int rows)
Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed for ResultSet objects generated by this Statement.
voidsetFloat(int parameterIndex, float x)
Sets the designated parameter to the given Java float value.
voidsetInt(int parameterIndex, int x)
Sets the designated parameter to the given Java int value.
voidsetLong(int parameterIndex, long x)
Sets the designated parameter to the given Java long value.
voidsetMaxFieldSize(int max)
Sets the limit for the maximum number of bytes that can be returned for character and binary column values in a ResultSet object produced by this Statement object.
voidsetMaxRows(int max)
Sets the limit for the maximum number of rows that any ResultSet object generated by this Statement object can contain to the given number.
voidsetNClob(int parameterIndex, Reader reader, long length)
Sets the designated parameter to a Reader object.
voidsetNString(int parameterIndex, String value)
Sets the designated parameter to the given String object.
voidsetNull(int parameterIndex, int sqlType)
Sets the designated parameter to SQL NULL.
voidsetNull(int parameterIndex, int sqlType, String typeName)
Sets the designated parameter to SQL NULL.
voidsetObject(int parameterIndex, Object x)

Sets the value of the designated parameter using the given object.

voidsetObject(int parameterIndex, Object x, int targetSqlType)
Sets the value of the designated parameter with the given object.
voidsetObject(int parameterIndex, Object x, SQLType targetSqlType)
Sets the value of the designated parameter with the given object.
voidsetObject(int parameterIndex, Object x, int targetSqlType, int scaleOrLength)

Sets the value of the designated parameter with the given object.

voidsetObject(int parameterIndex, Object x, SQLType targetSqlType, int scaleOrLength)

Sets the value of the designated parameter with the given object.

voidsetQueryTimeout(int seconds)
Sets the number of seconds the driver will wait for a Statement object to execute to the given number of seconds.
voidsetRef(int parameterIndex, Ref x)
Sets the designated parameter to the given REF(<structured-type>) value.
voidsetRowId(int parameterIndex, RowId x)
Sets the designated parameter to the given java.sql.RowId object.
voidsetShort(int parameterIndex, short x)
Sets the designated parameter to the given Java short value.
voidsetSQLXML(int parameterIndex, SQLXML xmlObject)
Sets the designated parameter to the given java.sql.SQLXML object.
voidsetString(int parameterIndex, String x)
Sets the designated parameter to the given Java String value.
voidsetTime(int parameterIndex, java.sql.Time x)
Sets the designated parameter to the given java.sql.Time value.
voidsetTime(int parameterIndex, java.sql.Time x, Calendar cal)
Sets the designated parameter to the given java.sql.Time value, using the given Calendar object.
voidsetTimestamp(int parameterIndex, java.sql.Timestamp x)
Sets the designated parameter to the given java.sql.Timestamp value.
voidsetTimestamp(int parameterIndex, java.sql.Timestamp x, Calendar cal)
Sets the designated parameter to the given java.sql.Timestamp value, using the given Calendar object.
voidsetURL(int parameterIndex, java.net.URL x)
Sets the designated parameter to the given java.net.URL value.
StringtoString()
Returns a string representation of the object.
Tunwrap(java.lang.Class iface)
Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy.