Query Fails Validation
Start with the diagnostic code, then narrow the problem by validation layer: syntax, parameters, dialect, or schema.
Fast Triage
- Check
Errors,Warnings, andErrorSummaryfirst. - If the code is
QL0001, focus on structural SQL or dialect syntax. - If the code is
QL0030orQL0031, focus on validation parameters. - If the code references tables, columns, procedures, or write restrictions, confirm that Level 3 is active and the schema snapshot is current.
Helpful Jumps
Example
var query = new SqlQuery("SELECT FROM customers");
Assert.False(query.IsValid);
Assert.Equal("QL0001", query.Errors[0].Code);
Assert.NotEmpty(query.ErrorSummary);