CustomSqlQuery Class

A custom query.

Namespace: DevExpress.DataAccess.Sql

Assembly: DevExpress.DataAccess.v20.2.dll

Declaration

public sealed class CustomSqlQuery :
    SqlQuery
Public NotInheritable Class CustomSqlQuery
    Inherits SqlQuery

The following members accept/return CustomSqlQuery objects:

Library Related API Members
Cross-Platform Class Library ValidateCustomSqlQueryEventArgs.CustomSqlQuery
Dashboard ValidateDashboardCustomSqlQueryEventArgs.CustomSqlQuery
ValidateDashboardCustomSqlQueryWebEventArgs.CustomSqlQuery

Remarks

The code sample below demonstrates how to programmatically create a CustomSqlQuery that selects all the elements of all the rows of a table.

using DevExpress.DataAccess;
using DevExpress.DataAccess.ConnectionParameters;
using DevExpress.DataAccess.Sql;
// ...

private SqlDataSource BindToData() {
    // Create a data source with the required connection parameters.   
    Access97ConnectionParameters connectionParameters =
    new Access97ConnectionParameters("../../Data/nwind.mdb", "", "");
    SqlDataSource ds = new SqlDataSource(connectionParameters);

    // Create an SQL query to access the Products table.
    CustomSqlQuery query = new CustomSqlQuery();
    query.Name = "customQuery1";
    query.Sql = "SELECT * FROM Products";

    ds.Queries.Add(query);
    return ds;
}

Inheritance

Object
SqlQuery
CustomSqlQuery

Extension Methods

Show 20 items
See Also