Back to Devexpress

SqlQuery.Parameters Property

corelibraries-devexpress-dot-dataaccess-dot-sql-dot-sqlquery.md

latest2.8 KB
Original Source

SqlQuery.Parameters Property

Provides access to the collection of parameters defined for the SqlQuery.

Namespace : DevExpress.DataAccess.Sql

Assembly : DevExpress.DataAccess.v25.2.dll

NuGet Package : DevExpress.DataAccess

Declaration

csharp
[LocalizableCategory(DataAccessStringId.QueryPropertyGridCommonCategoryName)]
public SqlQueryParameterCollection Parameters { get; }
vb
<LocalizableCategory(DataAccessStringId.QueryPropertyGridCommonCategoryName)>
Public ReadOnly Property Parameters As SqlQueryParameterCollection

Property Value

Type
DevExpress.DataAccess.Sql.SqlQueryParameterCollection

Remarks

Do not add OUT parameters to the SqlQuery.Parameters collection; otherwise, an error occurs when the stored procedure is called.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Parameters 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.

winforms-dashboard-designer-merge-dashboards-to-tabs/CS/DashboardMerger/ParametersMerger.cs#L56

csharp
foreach(SqlQuery query in sqlDataSource.Queries) {
    foreach(QueryParameter parameter in query.Parameters) {
        UpdateParameterExpression(parameter, originalNamePattern, copyNamePattern);

winforms-dashboard-designer-merge-dashboards-to-tabs/VB/DashboardMerger/ParametersMerger.vb#L61

vb
For Each query As SqlQuery In sqlDataSource.Queries
    For Each parameter As QueryParameter In query.Parameters
        UpdateParameterExpression(parameter, originalNamePattern, copyNamePattern)

See Also

SqlQuery Class

SqlQuery Members

DevExpress.DataAccess.Sql Namespace