does statement object contain the session id the database returns for the current session? What does a resultset contain?
A:
To the best of my knowledge, no, Statement
s do not have session IDs. It seems like the Java API specifications for the Statement
class backs that up. Basically, Statement
s are used to execute SQL statements by specifying a SQL query through the execute
method.
A ResultSet
is used to retrieve results which are returned by executing a query via a Statement
or PreparedStatement
.
The JDBC(TM) Database Access trail of The Java Tutorials contains some information on these topics. The following sections may be of interest:
coobird
2009-05-18 14:46:18