QL0030 Missing Parameter
The SQL text references a named parameter that is not present in the supplied validation parameters.
When It Appears
- A placeholder such as
@Idor:statusappears in the SQL, but the parameter object does not provide a matching value - System variables such as
@@ROWCOUNTdo not count as user parameters
Example
var query = new SqlQuery(
"SELECT * FROM dbo.orders WHERE order_id = @Id",
validationParameters: new { });
Assert.Contains(query.Errors, issue => issue.Code == "QL0030");
Next Steps
- Add the missing property to the validation object
- Fix the placeholder name if the SQL has a typo