tags:

views:

37

answers:

1

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, Statements do not have session IDs. It seems like the Java API specifications for the Statement class backs that up. Basically, Statements 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