API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.sql. PreparedStatement View Source
Author(s)
Since
Version
Serial
Hierarchy
 Wrapper
      Statement
          PreparedStatement
Subinterfaces
Description
public interface PreparedStatement
  An object that represents a precompiled SQL statement.
Methods
Hide/Show inherited methods
public void addBatch () throws SQLException
  Adds a set of parameters to this PreparedStatement object's batch of commands.
public void clearParameters () throws SQLException
  Clears the current parameter values immediately.
public boolean execute () throws SQLException
  Executes the SQL statement in this PreparedStatement object, which may be any kind of SQL statement.
public ResultSet executeQuery () throws SQLException
  Executes the SQL query in this PreparedStatement object and returns the ResultSet object generated by the query.
public int executeUpdate () throws SQLException
  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.
public ResultSetMetaData getMetaData () throws SQLException
  Retrieves a ResultSetMetaData object that contains information about the columns of the ResultSet object that will be returned when this PreparedStatement object is executed.
public ParameterMetaData getParameterMetaData () throws SQLException
  Retrieves the number, types and properties of this PreparedStatement object's parameters.
public void setArray (int parameterIndex, Array x) throws SQLException
  Sets the designated parameter to the given java.sql.Array object.
public void setAsciiStream (int parameterIndex, InputStream x) throws SQLException
  Sets the designated parameter to the given input stream.
public void setAsciiStream (int parameterIndex, InputStream x, int length) throws SQLException
  Sets the designated parameter to the given input stream, which will have the specified number of bytes.
public void setAsciiStream (int parameterIndex, InputStream x, long length) throws SQLException
  Sets the designated parameter to the given input stream, which will have the specified number of bytes.
public void setBigDecimal (int parameterIndex, BigDecimal x) throws SQLException
  Sets the designated parameter to the given java.math.BigDecimal value.
public void setBinaryStream (int parameterIndex, InputStream x) throws SQLException
  Sets the designated parameter to the given input stream.
public void setBinaryStream (int parameterIndex, InputStream x, int length) throws SQLException
  Sets the designated parameter to the given input stream, which will have the specified number of bytes.
public void setBinaryStream (int parameterIndex, InputStream x, long length) throws SQLException
  Sets the designated parameter to the given input stream, which will have the specified number of bytes.
public void setBlob (int parameterIndex, Blob x) throws SQLException
  Sets the designated parameter to the given java.sql.Blob object.
public void setBlob (int parameterIndex, InputStream inputStream) throws SQLException
  Sets the designated parameter to a InputStream object.
public void setBlob (int parameterIndex, InputStream inputStream, long length) throws SQLException
  Sets the designated parameter to a InputStream object.
public void setBoolean (int parameterIndex, boolean x) throws SQLException
  Sets the designated parameter to the given Java boolean value.
public void setByte (int parameterIndex, byte x) throws SQLException
  Sets the designated parameter to the given Java byte value.
public void setBytes (int parameterIndex, byte[] x) throws SQLException
  Sets the designated parameter to the given Java array of bytes.
public void setCharacterStream (int parameterIndex, Reader reader) throws SQLException
  Sets the designated parameter to the given Reader object.
public void setCharacterStream (int parameterIndex, Reader reader, int length) throws SQLException
  Sets the designated parameter to the given Reader object, which is the given number of characters long.
public void setCharacterStream (int parameterIndex, Reader reader, long length) throws SQLException
  Sets the designated parameter to the given Reader object, which is the given number of characters long.
public void setClob (int parameterIndex, Clob x) throws SQLException
  Sets the designated parameter to the given java.sql.Clob object.
public void setClob (int parameterIndex, Reader reader) throws SQLException
  Sets the designated parameter to a Reader object.
public void setClob (int parameterIndex, Reader reader, long length) throws SQLException
  Sets the designated parameter to a Reader object.
public void setDate (int parameterIndex, Date x) throws SQLException
  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.
public void setDate (int parameterIndex, Date x, Calendar cal) throws SQLException
  Sets the designated parameter to the given java.sql.Date value, using the given Calendar object.
public void setDouble (int parameterIndex, double x) throws SQLException
  Sets the designated parameter to the given Java double value.
public void setFloat (int parameterIndex, float x) throws SQLException
  Sets the designated parameter to the given Java float value.
public void setInt (int parameterIndex, int x) throws SQLException
  Sets the designated parameter to the given Java int value.
public void setLong (int parameterIndex, long x) throws SQLException
  Sets the designated parameter to the given Java long value.
public void setNCharacterStream (int parameterIndex, Reader value) throws SQLException
  Sets the designated parameter to a Reader object.
public void setNCharacterStream (int parameterIndex, Reader value, long length) throws SQLException
  Sets the designated parameter to a Reader object.
public void setNClob (int parameterIndex, NClob value) throws SQLException
  Sets the designated parameter to a java.sql.NClob object.
public void setNClob (int parameterIndex, Reader reader) throws SQLException
  Sets the designated parameter to a Reader object.
public void setNClob (int parameterIndex, Reader reader, long length) throws SQLException
  Sets the designated parameter to a Reader object.
public void setNString (int parameterIndex, String value) throws SQLException
  Sets the designated paramter to the given String object.
public void setNull (int parameterIndex, int sqlType) throws SQLException
  Sets the designated parameter to SQL NULL.
public void setNull (int parameterIndex, int sqlType, String typeName) throws SQLException
  Sets the designated parameter to SQL NULL.
public void setObject (int parameterIndex, Object x) throws SQLException
  Sets the value of the designated parameter using the given object.
public void setObject (int parameterIndex, Object x, int targetSqlType) throws SQLException
  Sets the value of the designated parameter with the given object.
public void setObject (int parameterIndex, Object x, int targetSqlType, int scaleOrLength) throws SQLException
  Sets the value of the designated parameter with the given object.
public void setRef (int parameterIndex, Ref x) throws SQLException
  Sets the designated parameter to the given REF(<structured-type>) value.
public void setRowId (int parameterIndex, RowId x) throws SQLException
  Sets the designated parameter to the given java.sql.RowId object.
public void setShort (int parameterIndex, short x) throws SQLException
  Sets the designated parameter to the given Java short value.
public void setSQLXML (int parameterIndex, SQLXML xmlObject) throws SQLException
  Sets the designated parameter to the given java.sql.SQLXML object.
public void setString (int parameterIndex, String x) throws SQLException
  Sets the designated parameter to the given Java String value.
public void setTime (int parameterIndex, Time x) throws SQLException
  Sets the designated parameter to the given java.sql.Time value.
public void setTime (int parameterIndex, Time x, Calendar cal) throws SQLException
  Sets the designated parameter to the given java.sql.Time value, using the given Calendar object.
public void setTimestamp (int parameterIndex, Timestamp x) throws SQLException
  Sets the designated parameter to the given java.sql.Timestamp value.
public void setTimestamp (int parameterIndex, Timestamp x, Calendar cal) throws SQLException
  Sets the designated parameter to the given java.sql.Timestamp value, using the given Calendar object.
public void setUnicodeStream (int parameterIndex, InputStream x, int length) throws SQLException
  Sets the designated parameter to the given input stream, which will have the specified number of bytes.
public void setURL (int parameterIndex, URL x) throws SQLException
  Sets the designated parameter to the given java.net.URL value.
Fields
Hide/Show inherited fields
publicfinalstatic int CLOSE_ALL_RESULTS = "3" [Inherited From Statement]
  The constant indicating that all ResultSet objects that have previously been kept open should be closed when calling getMoreResults.
publicfinalstatic int CLOSE_CURRENT_RESULT = "1" [Inherited From Statement]
  The constant indicating that the current ResultSet object should be closed when calling getMoreResults.
publicfinalstatic int EXECUTE_FAILED = "-3" [Inherited From Statement]
  The constant indicating that an error occured while executing a batch statement.
publicfinalstatic int KEEP_CURRENT_RESULT = "2" [Inherited From Statement]
  The constant indicating that the current ResultSet object should not be closed when calling getMoreResults.
publicfinalstatic int NO_GENERATED_KEYS = "2" [Inherited From Statement]
  The constant indicating that generated keys should not be made available for retrieval.
publicfinalstatic int RETURN_GENERATED_KEYS = "1" [Inherited From Statement]
  The constant indicating that generated keys should be made available for retrieval.
publicfinalstatic int SUCCESS_NO_INFO = "-2" [Inherited From Statement]
  The constant indicating that a batch statement executed successfully but that no count of the number of rows it affected is available.
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar