Ulrich is correct that the execute method must be used for executing a macro, not the executeUpdate or executeQuery method.
However, those methods are all overloaded, meaning multiple method definitions with different argument lists, and your problem is due to using the wrong overloaded version of the method.
Your problem is due to using the execute(String) method with a PreparedStatement. That is not valid. The execute(String) method is only for use with a non-prepared regular Statement.
With a PreparedStatement or CallableStatement, use the execute() method with no String argument.
↧