Skip to main content

SqlDataSource.DisableCustomQueryValidation Property

SECURITY NOTE

For security reasons, custom SQL queries that contain only SELECT statements are permitted. Read the following topic for information: Database Security.

Gets or sets whether the validation of custom SQL queries is performed.

Namespace: DevExpress.DataAccess.Sql

Assembly: DevExpress.DataAccess.v24.2.dll

Declaration

[Browsable(false)]
public static bool DisableCustomQueryValidation { get; set; }

Property Value

Type Description
Boolean

true, to disable the validation of custom SQL queries; otherwise, false.

The default is false.

Remarks

If the DisableCustomQueryValidation property is set to false, the SqlDataSource will be filled using only custom SQL queries that contain only SELECT statements. If the validation was not successful, the CustomSqlQueryValidationException will be thrown.

To skip query validation, set the DisableCustomQueryValidation property to true.

To access custom SQL queries (CustomSqlQuery) for the specified SqlDataSource, use the SqlDataSource.Queries property.

Note

If necessary, you can manage the validation of custom SQL queries by handling the SqlDataSource.ValidateCustomSqlQuery and SqlDataSource.ValidateCustomSqlQueryGlobal events.

See Also