
PreparedStatement
The JDBC API
|
103
void clearParameters( )
Clears the current SQL statement’s parameter values.
boolean execute( )
Executes the current precompiled SQL statement. It returns
true if the SQL statement creates a result set, otherwise false.
ResultSet executeQuery( )
Executes the current precompiled SELECT statement
returning its result set.
int executeUpdate( )
Executes the current precompiled INSERT, UPDATE, or
DELETE statement, returning the number of rows affected.
ResultSetMetaData getMetaData( )
Returns the result set metadata for the current precompiled
SELECT statement. (Java 1.2)
ParameterMetaData getParameterMetaData( )
Returns a parameter metadata object that describes this
prepared statement’s parameters. (Java 1.4)
NOTE
All of the following mutator or setXXX( ) methods set the
specified SQL IN parameter value for the specified pa-
rameter index (starting from 1, incrementing left to right)
in the SQL statement.
void setArray(int parameterIndex, Array x)
Sets a value using the specified Array. (Java 1.2)
void setAsciiStream(int parameterIndex, InputStream x,
int length)
Sets a value using the first length bytes of the specified input
stream.
void setBigDecimal(int parameterIndex, BigDecimal x)
Sets a value using the specified java.math.BigDecimal.
void setBinaryStream(int parameterIndex, InputStream x,
int length)
Sets a value using the first length bytes of the specified input
stream. ...