title: Cannot determine why this SQL statement won't execute (Derby)
body: <p>My table is set up like this and seems to get created properly. (no exceptions are thrown)</p>
  
  <pre><code>    String sqlString = String.format(
              "CREATE TABLE %s(%s BIGINT, 
              %s VARCHAR(%d), 
              %s VARCHAR(%d), 
              %s VARCHAR(%d), 
              %s INT, 
              %s INT, 
              %s BIGINT, 
              PRIMARY KEY (%s))",
                  //
                  TABLE_NAME, //
                  Column.ID.name, //
                  Column.MAKE.name, Column.MAKE.length, //
                  Column.MODEL.name, Column.MODEL.length, //
                  Column.SERIAL_NUMBER.name, Column.SERIAL_NUMBER.length, //
                  Column.YEAR.name, //
                  Column.MILEAGE.name, //
                  Column.CUSTOMER_ID.name, //
                  Column.ID.name);
  </code></pre>
  
  <p>I am trying to insert the following:</p>
  
  <pre><code>String sqlString = String.format(//
              "INSERT INTO %s values(?, ?, ?, ?, ?, ?, ?)", TABLE_NAME);
      boolean result = execute(sqlString, //
              motorcycle.getId(), // long
              motorcycle.getMake(), // String
              motorcycle.getModel(), // String
              motorcycle.getSerialNumber(), // String
              motorcycle.getYear(), // int
              motorcycle.getMileage(), // int
              motorcycle.getCustomerId()); //long
  </code></pre>
  
  <p><code>execute(sqlString, args[])</code> returns <code>false</code>, but no exceptions are thrown. 
  derby.log has no information about what's going wrong either. </p>
  
  <p>Am I using the wrong SQL data types?</p>
  
  <p>Edit: </p>
  
  <p>The <code>execute(sqlString, args[])</code> method is in the Dao super-class and works fine for the other sub-classes. </p>
  
  <p>The code is as follows: </p>
  
  <pre><code> protected boolean execute(String preparedStatementString, Object... args) throws SQLException {
          LOG.debug(preparedStatementString);
          boolean result = false;
          PreparedStatement statement = null;
          try {
              Connection connection = Database.getConnection();
              statement = connection.prepareStatement(preparedStatementString);
              int i = 1;
              for (Object object : args) {
                  statement.setObject(i, object);
                  i++;
              }
  
              statement.executeUpdate();
              result = true;
          } finally {
              close(statement);
          }
  
          return result;
      }
  </code></pre>