title: Error access to database
body: <p>Please explain to me differents between </p>
  
  <pre><code>private boolean inUse(JDBCTemplates jdbc, BigInteger firmwareId) {
                 String query = "select * from references ref " +
                  "where ref.attr_id = 9 " +
                  "and ref.reference = ?";
          try { 
                 s = (String) jdbc.selectForObject(query....);
              } catch (Exception e) {
                 log.info(e.toString());
              }
          return ...;
  }
  </code></pre>
  
  <p>and </p>
  
  <pre><code>private boolean inUse(JDBCTemplates jdbc, BigInteger firmwareId) {
                String query = "select * from references ref " +
                "where ref.attr_id = 9 " +
                "and ref.reference =" + firmwareId;
          try { 
                s = (String) jdbc.selectForObject(query....);
              } catch (Exception e) {
                log.info(e.toString());
              }
          return ...;
  }
  </code></pre>
  
  <p>In the second case, I get an access error to the database (<strong>jdbc.DataAccessException: Error due to access to database</strong>), and in the first case everything works.</p>