title: Unable to view recently inserted results in H2
body: <p>I'm using the H2 Database system for a small java project I'm working on. If I manually run the Queries, everything works as expected, but when I run my program, I get the following:</p>
  
  <pre><code>Constructed: INSERT INTO library VALUES (null,'TEMPORARY_EFFECT_1369614387100','asdf',0,0,0,0,0)
  Constructed: SELECT id FROM library WHERE name='TEMPORARY_EFFECT_1369614387100'
  org.h2.jdbc.JdbcSQLException: No data is available [2000-171]
      at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
      at org.h2.message.DbException.get(DbException.java:169)
      at org.h2.message.DbException.get(DbException.java:146)
      at org.h2.message.DbException.get(DbException.java:135)
      at org.h2.jdbc.JdbcResultSet.checkOnValidRow(JdbcResultSet.java:2956)
      at org.h2.jdbc.JdbcResultSet.get(JdbcResultSet.java:2962)
      at org.h2.jdbc.JdbcResultSet.getInt(JdbcResultSet.java:306)
  </code></pre>
  
  <p>I'm not exactly sure what is going on. According to the JavaDocs for JDBC and H2, I'm doing things right (I think). The <code>INSERT</code> is executed by calling <code>db.createStatement().executeUpdate(...)</code> and the <code>SELECT via db.prepareStatement(..., ResultSet.TYPE_SCROLL_INSENSITIVE)</code></p>