Skip to Main Content
JDBC Pocket Reference
book

JDBC Pocket Reference

by Donald Bales
January 2003
Intermediate to advanced content levelIntermediate to advanced
176 pages
5h 3m
English
O'Reilly Media, Inc.
Content preview from JDBC Pocket Reference
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. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Pro Couchbase Server, Second Edition

Pro Couchbase Server, Second Edition

David Ostrovsky, Mohammed Haji, Yaniv Rodenski
Pro Couchbase Server

Pro Couchbase Server

David Ostrovsky, Yaniv Rodenski

Publisher Resources

ISBN: 9780596528713