error is in this line
rs = stmt.executeQuery(selectSQL);
do this way
rs = stmt.executeQuery();
More Related Contents:
- Java: Insert multiple rows into MySQL with PreparedStatement
- Using “like” wildcard in prepared statement
- Getting java.sql.SQLException: Operation not allowed after ResultSet closed
- right syntax to use near ‘?’
- How to use prepared statement for select query in Java?
- Connect Java to a MySQL database
- MySQLSyntaxErrorException near “?” when trying to execute PreparedStatement
- How can I get the SQL of a PreparedStatement?
- Can we connect remote MySQL database in Android using JDBC? [closed]
- java.sql.SQLException Parameter index out of range (1 > number of parameters, which is 0) [closed]
- Cannot issue data manipulation statements with executeQuery()
- java.sql.SQLException: Access denied for user ‘root’@’localhost’ (using password: YES)
- JDBC MySql connection pooling practices to avoid exhausted connection pool
- Running a .sql script using MySQL with JDBC
- How does Java’s PreparedStatement work?
- Java JDBC Access denied for user [closed]
- preparedStatement syntax error
- Passing parameters to a JDBC PreparedStatement
- JDBC character encoding
- Problems reading/writing UTF-8 data in MySQL from Java using JDBC connector 5.1
- PreparedStatement setNull(..)
- MySQL connector error “The server time zone value Central European Time” [duplicate]
- com.mysql.jdbc.PacketTooBigException
- com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server [duplicate]
- Should a database connection stay open all the time or only be opened when needed?
- Converting mysql table to spark dataset is very slow compared to same from csv file
- MySQL & Java – Get id of the last inserted value (JDBC) [duplicate]
- JDBC Prepared Statement . setDate(….) doesn’t save the time, just the date.. How can I save the time as well?
- PreparedStatement and setTimestamp in oracle jdbc
- java.sql.SQLException: No database selected – why?