データベース内の他のすべてのテーブルで正常に機能するテーブルから選択しようとしていますが、次のことを試みるとエラーが発生します。
db.makeQuery("SELECT * FROM References");
どの呼び出し:
public ResultSet makeQuery(String query) throws Exception
{
preparedStatement = connect.prepareStatement(query);
resultSet = preparedStatement.executeQuery(query);
return resultSet;
}
次に、次のエラーがスローされます。
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:
You have an error in your SQL syntax; check the manual that corresponds to your
MySQL server version for the right syntax to use near 'References' at line 1
このステートメントが機能するため、私には非常に奇妙に思えます。
db.makeQuery("select * from Products");