The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

Session.ExecuteQueryWithMetadata(String) Method

Executes the specified SQL query and returns its result set along with the types and names of retrieved columns.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v19.2.dll

Declaration

public SelectedData ExecuteQueryWithMetadata(
    string sql
)
Public Function ExecuteQueryWithMetadata(
    sql As String
) As SelectedData
public SelectedData ExecuteQueryWithMetadata(
    string sql
)
Public Function ExecuteQueryWithMetadata(
    sql As String
) As SelectedData

Parameters

Name Type Description
sql String

A String value that specifies an SQL query.

Parameters

Name Type Description
sql String

A String value that specifies an SQL query.

Returns

Type Description
SelectedData

A SelectedData object, specifying the query's result set and the types and names of retrieved columns.

Returns

Type Description
SelectedData

A SelectedData object, specifying the query's result set and the types and names of retrieved columns.

Remarks

Use ExecuteQueryWithMetadata to query data stores for result sets. You can visualize result sets via the XPDataView. To learn how to access the resulting data, refer to How to: Access Data in SQL Query Results.

To learn more about executing SQL queries in XPO, refer to Direct SQL Queries.

Note

The ExecuteQueryWithMetadata method sends queries directly, so the correct query syntax depends on a particular database server.

See Also