End-User Documentation

QL0030 Missing Parameter

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 @Id or :status appears in the SQL, but the parameter object does not provide a matching value
  • System variables such as @@ROWCOUNT do 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