title: MySQL Result Set - No value specified for parameter 1
body: <p>I can't figure out what this error means or how to fix it. I'm trying to retrieve some data from one of my databases but keep running into this error message below.</p>
  
  <pre><code>preparedStatement = connect
              .prepareStatement("SELECT * FROM mydatabase "
                          + " WHERE TickerID=?");
              resultSet = preparedStatement.executeQuery(); //where it says the error is, line 132
              while(resultSet.next())
              {
                  aIDTA = resultSet.getInt("AccountID");
                  nameTA = resultSet.getString("Name");
                  CashBalance = resultSet.getDouble("CashBalance");
                  TradeFeeBuy = resultSet.getDouble("TradeFeeBuy");
                  TradeFeeSell = resultSet.getDouble("TradeFeeSell");
                  AssetsBalance = resultSet.getDouble("AssetsBalance");
              }
  
  
  
  Exception in thread "main" java.sql.SQLException: No value specified for parameter 1
      at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:996)
      at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:935)
      at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:924)
      at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:870)
      at com.mysql.jdbc.PreparedStatement.checkAllParametersSet(PreparedStatement.java:2281)
      at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:2261)
      at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:2191)
      at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2004)
      at BuyAndSell.BuyAndSell(BuyAndSell.java:132)
      at Main.main(Main.java:21)
  </code></pre>