java.sql.SQLException: Column Index out of range, 2 > 1
java.sql.SQLException: Column Index out of range, 2 > 1 try { Class.forName("com.mysql.jdbc.Driver"); java.sql.Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3305/commity","root","root"); PreparedStatement pst2=(PreparedStatement) con.prepareStatement("select Starting_Date from group1 where Group_Number='"+jComboBox2.getSelectedItem().toString()+"'"); ResultSet rs2=pst2.executeQuery(); while(rs2.next()) { startCalendar.setTime(rs2.getDate(2)); } ...