I am having this kind of error when trying to connect and retrieve data from my database.
The method executeQuery() cannot take arguments on a PreparedStatement or C
Just add { } for your querystring.i.e
{ }
String queryString = "{SELECT P_ID, lname, fname, mname FROM stu_info Where lname = ?}";
execute() and executeUpdate() will both work. executeQuery() only works when your procedure returns a result set.
execute()
executeUpdate()
executeQuery()