corelibraries-devexpress-dot-dataaccess-dot-sql-dot-sqlquery-d5f64c17.md
Specifies the query name.
Namespace : DevExpress.DataAccess.Sql
Assembly : DevExpress.DataAccess.v25.2.dll
NuGet Package : DevExpress.DataAccess
[DefaultValue("")]
[LocalizableCategory(DataAccessStringId.QueryPropertyGridCommonCategoryName)]
public string Name { get; set; }
<DefaultValue("")>
<LocalizableCategory(DataAccessStringId.QueryPropertyGridCommonCategoryName)>
Public Property Name As String
| Type | Default | Description |
|---|---|---|
| String | String.Empty |
A String value, specifying the query name.
|
The following code snippets (auto-collected from DevExpress Examples) contain references to the Name property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
foreach (var query in dataSources.SelectMany(ds => ds.Queries.Select(q => new { DataSource = ds, Query = q }))) {
var ods = new DashboardObjectDataSource("ods|" + query.DataSource.ComponentName + "|" + query.Query.Name);
e.Dashboard.DataSources.Add(ods);
DashboardSqlDataSource dataSource = dataSources.First(ds => ds.ComponentName == names[1]);
SqlQuery query = dataSource.Queries.First(q => q.Name == names[2]);
reporting-winforms-sql-data-source-runtime/CS/RuntimeSqlDataSourceReportSample/QueryHelper.cs#L22
.Build("Categories");
query.Name = "Categories with 7 or More Products";
return query;
if(!string.IsNullOrEmpty(selectQuery.Name)) {
queryName = selectQuery.Name;
reporting-wpf-create-report-in-code/CS/RuntimeReportsApplication/MainWindow.xaml.cs#L37
SqlDataSource ds = report.DataSource as SqlDataSource;
CreateDetailReport(report, ds.Queries[0].Name + "." + ds.Relations[0].Name);
For Each query In dataSources.SelectMany(Function(ds) ds.Queries.Select(Function(q) New With {Key .DataSource = ds, Key .Query = q}))
Dim ods = New DashboardObjectDataSource("ods|" & query.DataSource.ComponentName & "|" & query.Query.Name)
e.Dashboard.DataSources.Add(ods)
Dim dataSource As DashboardSqlDataSource = dataSources.First(Function(ds) ds.ComponentName = names(1))
Dim query As SqlQuery = dataSource.Queries.First(Function(q) q.Name = names(2))
reporting-winforms-sql-data-source-runtime/VB/RuntimeSqlDataSourceReportSample/ReportCreator.vb#L22
report.DataSource = ds
report.DataMember = ds.Queries(0).Name
winforms-dashboard-bind-to-sql-server-database-file/VB/BindToMsSqlDatabaseFileExample/Form1.vb#L23
dataItem.DataSource = dashboardSqlDataSource
dataItem.DataMember = dashboardSqlDataSource.Queries(0).Name
End If
winforms-grid-create-configure-sql-data-source/VB/dxSample/Form1.vb#L52
Dim query As CustomSqlQuery = New CustomSqlQuery()
query.Name = "customQuery1"
query.Sql = "SELECT * FROM Products"
See Also