Can someone please help me 293 try t System out printin flight 294 System out pr
ID: 3832799 • Letter: C
Question
Can someone please help me
293 try t System out printin flight 294 System out printin (flight 295 selectNames. setString (1, flight 296 selectNames. setString (2, flight 297 298 result Set select Booking execute Query 299 wait ListNames waitlist flight drop (flight) 300 int size waitListNames. size 301 302 303 Previous Next Select EA E Find: E Output FlightSchedulersfs 5208 (run D flight java. Sql.SQLException: At least one parameter to the current statement is uninitialized. at org.apache. derby.client.am. SQLExceptionFactory40. getSQLException(Unknown Source) at org. apache. derby. client .am. SqlException. getSQLException (Unknown Source) at org.apache. derby. Client. am. Prepared Statement.execute Query (Unknown Source) at flightschedulers f s5208.Booking, reBook (Booking. ava: 299 at flightschedulersfs5208. Flight dropflight Flight. ava: 135Explanation / Answer
I guess I answered similar exception before also,
The thing that needs to be understood here is when you prepare a statement you keep some space for putting in your variables using '?'. Now if you read exception it states that "At least one parameter to the current statement is unitialized".
This indicate that you have not set value for one of the parameter for the query you are trying to execute.
If you see error it states that error occured while executing query in line 299, which is selectBooking.
Are you setting all parameter for selectBooking?
Parameters are numbered from 1,2, 3, 4, etc in the order they are appearing in the prepared statement.
So set you parameters appropriately and then try running your application.