 <p>You say that the <code>?</code> is supposed to be for a table name, so you need to provide an actual table name before calling <code>Statement.executeUpdate()</code>. At that point the JDBC driver will tell the database to actually run the statement, so obviously all parameters need to be bound.</p> <p>Maybe you meant to write this:</p> <pre><code>CallableStatement call = jdbcConnection.prepareCall("call sp_msforeachtable(?)"); call.setString(1, "AnActualTableName"); call.executeUpdate(); </code></pre> <p>or maybe you meant to write this:</p> <pre><code>CallableStatement call = jdbcConnection.prepareCall("call sp_msforeachtable(\"ALTER TABLE ? NOCHECK CONSTRAINT all\")"); call.setString(1, "AnActualTableName"); call.executeUpdate(); </code></pre> <p>I'm not sure exactly what <code>sp_msforeachtable()</code> is supposed to do, but I do know that you have to provide values for all parameters before calling <code>executeUpdate()</code></p>