CustomSqlQuery Class

A custom query.

Namespace: DevExpress.DataAccess.Sql

Assembly: DevExpress.DataAccess.v19.2.dll

Declaration

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

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

DevExpress.DataAccess.UI.Sql.SqlDataSourceUIHelper.EditQuery()
DevExpress.DataAccess.UI.Sql.SqlDataSourceUIHelper.EditQuery(IRepositoryItemsProvider)
DevExpress.DataAccess.UI.Sql.SqlDataSourceUIHelper.EditQuery(UserLookAndFeel)
DevExpress.DataAccess.UI.Sql.SqlDataSourceUIHelper.EditQuery(UserLookAndFeel, IRepositoryItemsProvider)
DevExpress.DataAccess.UI.Sql.SqlDataSourceUIHelper.EditQuery(UserLookAndFeel, IWin32Window)
DevExpress.DataAccess.UI.Sql.SqlDataSourceUIHelper.EditQuery(UserLookAndFeel, IWin32Window, IRepositoryItemsProvider)
DevExpress.DataAccess.UI.Sql.SqlDataSourceUIHelper.EditQuery(UserLookAndFeel, IWin32Window, DevExpress.DataAccess.Sql.IDBSchemaProvider)
DevExpress.DataAccess.UI.Sql.SqlDataSourceUIHelper.EditQuery(UserLookAndFeel, IWin32Window, DevExpress.DataAccess.Sql.IDBSchemaProvider, IRepositoryItemsProvider)
DevExpress.DataAccess.UI.Sql.SqlDataSourceUIHelper.EditQuery(UserLookAndFeel, IWin32Window, DevExpress.DataAccess.Sql.IDBSchemaProvider, IParameterService)
DevExpress.DataAccess.UI.Sql.SqlDataSourceUIHelper.EditQuery<TModel>(UserLookAndFeel, IWin32Window, DevExpress.DataAccess.Sql.IDBSchemaProvider, IParameterService, Action<IWizardCustomization<TModel>>)
DevExpress.DataAccess.UI.Sql.SqlDataSourceUIHelper.EditQuery<TModel>(UserLookAndFeel, IWin32Window, DevExpress.DataAccess.Sql.IDBSchemaProvider, IParameterService, Action<IWizardCustomization<TModel>>, IServiceProvider)
DevExpress.DataAccess.UI.Sql.SqlDataSourceUIHelper.EditQuery(UserLookAndFeel, IWin32Window, DevExpress.DataAccess.Sql.IDBSchemaProvider, IParameterService, IRepositoryItemsProvider)
DevExpress.DataAccess.UI.Sql.SqlDataSourceUIHelper.EditQuery<TModel>(UserLookAndFeel, IWin32Window, DevExpress.DataAccess.Sql.IDBSchemaProvider, IParameterService, IRepositoryItemsProvider, Action<IWizardCustomization<TModel>>)
DevExpress.DataAccess.UI.Sql.SqlDataSourceUIHelper.EditQuery<TModel>(UserLookAndFeel, IWin32Window, DevExpress.DataAccess.Sql.IDBSchemaProvider, IParameterService, IRepositoryItemsProvider, Action<IWizardCustomization<TModel>>, IServiceProvider)
DevExpress.DataAccess.UI.Sql.SqlDataSourceUIHelper.EditQuery<TModel>(UserLookAndFeel, IWin32Window, DevExpress.DataAccess.Sql.IDBSchemaProvider, IParameterService, IRepositoryItemsProvider, Action<IWizardCustomization<TModel>>, IServiceProvider, ICustomQueryValidator)
DevExpress.DataAccess.UI.Sql.SqlDataSourceUIHelper.EditQuery(EditQueryContext)
DevExpress.DataAccess.UI.Sql.SqlDataSourceUIHelper.EditQuery<TModel>(EditQueryContext, Action<IWizardCustomization<TModel>>)
DevExpress.DataAccess.UI.Sql.SqlDataSourceUIHelper.EditQueryWithQueryBuilder()
DevExpress.DataAccess.UI.Sql.SqlDataSourceUIHelper.EditQueryWithQueryBuilder(QueryBuilderEditQueryContext)
DevExpress.DataAccess.UI.Sql.SqlDataSourceUIHelper.EditQueryWithQueryBuilder(QueryBuilderEditQueryContext, QueryBuilderRunnerDelegate)
See Also