February 10, 2009

How to make a prepared statement scrollable and updateable in JDBC?

// New in JDBC 2.0
PreparedStatement ps2 = conn.prepareStatement(sqlString,
ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_UPDATEABLE);

// New in JDBC 3.0
PreparedStatement ps3 = conn.prepareStatement(sqlString,
ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_UPDATEABLE,
ResultSet.HOLD_CURSOR_OVER_COMMIT);

0 comments:

Recent Posts

Last Comments

  © Blogger template 'Computer Logo' by Ourblogtemplates.com 2008

Back to TOP