Sunday, April 25, 2010

JDBC 3.0 features

1. Reusuability of prepared statements by Connection pools.

2. new concept Save Points are added.

3. DatabaseMetaData api is added.

4. The data in the Blob and Clob can be altered.

5. Added a new type java.sql.Types.BOOLEAN

6. Allows stored procedure parameters to be passed by name.

7. Passing parameters to Callable Statements.

8. Added new type java.sql.Types.DATALINK
DATALINK provides access to external resources , urls.
You can store the urls using DATALINK type and get by using rs.getURL() method.

9. Retrieving auto generated keys. and the logic is

st.executeUpdate("insert into mytable(name, value) values('product',100) ", Statement.RETURN_GENERATED_KEYS);
ResultSet rs = st.getGeneratedKeys();
if ( ) {
    // Retrieve the auto generated key(s).
    int key = rs.getInt(1);

You might also like ..

Delicious Digg Furl Stumbleupon Technorati Squidoo Reddit live Yahoo MySpaceGoogle Yahoo Buzz Facebook Twitter Orkut Google Buzz Email this postby bbP

No comments: