Back to Devexpress

SqlDataSource.DisableCustomQueryValidation Property

corelibraries-devexpress-dot-dataaccess-dot-sql-dot-sqldatasource-e0457592.md

latest2.9 KB
Original Source

SqlDataSource.DisableCustomQueryValidation Property

SECURITY-RELATED CONSIDERATIONS

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.v25.2.dll

NuGet Package : DevExpress.DataAccess

Declaration

csharp
[Browsable(false)]
public static bool DisableCustomQueryValidation { get; set; }
vb
<Browsable(False)>
Public Shared Property DisableCustomQueryValidation As Boolean

Property Value

TypeDescription
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

Custom SQL Query Validation (WinForms)

SqlDataSource Class

SqlDataSource Members

DevExpress.DataAccess.Sql Namespace