DBA > Job Interview Questions > DERBY Java Database FAQs

Non-Holdable Cursor Example

More DBA job interview questions and answers at http://dba.fyicenter.com/Interview-Questions/

(Continued from previous question...)

Non-Holdable Cursor Example

The following example uses Connection.createStatement to return a ResultSet that will close after a commit is performed:

Connection conn = ds.getConnection(user, passwd);
Statement stmt =
conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_READ_ONLY,
ResultSet.CLOSE_CURSORS_AT_COMMIT);

(Continued on next question...)

Other Job Interview Questions