Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- This error "Not all parameters have been populated" usually occurs when we miss passing a value for the single question mark. Please make sure you are passing values to all question marks while executing the prepared statements.
- Example : (in JDBC context)
- ~~~~~~~~~~~~~~~~~~~~~
- PreparedStatement ps = new PreparedStatement(‘select * from demo where id >?”);
- ps.setInt(1,11); #setting the question mark value
- ResultSet rs =ps.executeQuery();
- The above snippet will not throw an error.
- PreparedStatement ps = new PreparedStatement(‘select * from demo where id >?”);
- ResultSet rs =ps.executeQuery();
- The above snippet will throw an error as there are insufficient parameters.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement