Skip to main content

SqlDataSource.Result Property

Gets a collection of tables and their relations from the current SqlDataSource.

Namespace: DevExpress.DataAccess.Sql

Assembly: DevExpress.DataAccess.v22.2.dll

NuGet Package: DevExpress.DataAccess


public IResultSet Result { get; }

Property Value

Type Description

An object implementing the IResultSet interface that is the collection of tables and their relations from the current SqlDataSource.


The Result property provides access to the collection of data tables and their relations from the current SqlDataSource. For each table, you can access columns and rows belonging to this table.

Note that for the inherited DashboardSqlDataSource class, the Result property does not return any data. The Dashboard control reads data internally.


Note that the Result property is initialized after the SqlDataSource is filled (for instance, using the SqlDataSource.Fill method).


The following example illustrates how to use the SqlDataSource.Result property to extract all data records from an SqlDataSource and pass them to a corresponding DataTable object.

using DevExpress.DataAccess.Sql;
using DevExpress.DataAccess.Sql.DataApi;
using System;
using System.Data;
using System.Linq;
using System.Windows.Forms;
// ...

private void button1_Click(object sender, EventArgs e) {
    XtraReport1 report = new XtraReport1();
    SqlDataSource ds = report.DataSource as SqlDataSource;

    ITable src = ds.Result["Categories"];
    DataTable dest = new DataTable("Categories");
    foreach (IColumn column in src.Columns)
        dest.Columns.Add(column.Name, column.Type);
    foreach (IRow row in src)

The following code snippets (auto-collected from DevExpress Examples) contain references to the Result property.


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.

See Also