An Exception has occurred! com.microso开发者_高级运维ft.sqlserver.jdbc.SQLServerException: The value is not set for the parameter number 1.
You have a PreparedStatement
with at least one valueholder ?
. When you execute it without having set the valueholder with a value using one of the PreparedStatement
's setter methods, then you will get this exception. To solve this you obviously need to set the value with the desired value, e.g.
preparedStatement.setString(1, value);
Or if you don't need it at all, then just remove it from the SQL string or create another one for this specific purpose.
For more about PreparedStatement
s, consult the JDBC tutorial.
精彩评论