Back to Devexpress

SqlWizardSettings.DatabaseCredentialsSavingBehavior Property

windowsforms-devexpress-dot-dataaccess-dot-ui-dot-wizard-dot-sqlwizardsettings.md

latest6.6 KB
Original Source

SqlWizardSettings.DatabaseCredentialsSavingBehavior Property

Specifies whether to serialize database credentials along with document layouts (for example, a report or dashboards). Optionally, you can enable your end users to select the required behavior.

Namespace : DevExpress.DataAccess.UI.Wizard

Assembly : DevExpress.DataAccess.v25.2.dll

NuGet Package : DevExpress.DataAccess

Declaration

csharp
[DefaultValue(SensitiveInfoSavingBehavior.Never)]
public SensitiveInfoSavingBehavior DatabaseCredentialsSavingBehavior { get; set; }
vb
<DefaultValue(SensitiveInfoSavingBehavior.Never)>
Public Property DatabaseCredentialsSavingBehavior As SensitiveInfoSavingBehavior

Property Value

TypeDefaultDescription
SensitiveInfoSavingBehaviorNever

A SensitiveInfoSavingBehavior enumeration value.

|

Available values:

NameDescription
Always

Database credentials are always serialized along with document layouts and end-users cannot change this behavior.

| | Never |

Database credentials are never serialized along with document layouts and end-users cannot change this behavior.

| | Prompt |

After an existing connection is selected (or a new one is specified), the Data Source wizard prompts an end-user whether or not to save database credentials along with the document layout.

|

Property Paths

You can access this nested property as listed below:

LibraryObject TypePath to DatabaseCredentialsSavingBehavior
WinForms ControlsDataSourceWizardSettings

.SqlWizardSettings .DatabaseCredentialsSavingBehavior

| | Dashboard | DashboardDesignerDataSourceWizardSettings |

.SqlWizardSettings .DatabaseCredentialsSavingBehavior

| | .NET Reporting Tools | XRDesignMdiController |

.SqlWizardSettings .DatabaseCredentialsSavingBehavior

|

Remarks

Enable the DataConnectionBase.StoreConnectionNameOnly property when you implement the IConnectionStorageService interface to serialize database connection names only. This behavior does not expose database credentials in report layout definitions.

View Example: Reporting for WinForms - How to Store Connections Available in the Data Source Wizard

When the StoreConnectionNameOnly property is disabled, the behavior depends on the DatabaseCredentialsSavingBehavior and IConnectionStorageService.CanSaveConnection property values.

|

SensitiveInfoSavingBehavior

|

Behavior

| | --- | --- | |

Prompt

|

| |

Always or Never

|

Users cannot specify whether to store database credentials with serialized layouts. After they select a connection or specify a new one, the Data Source Wizard displays the following page:

|

The following code snippet shows how to specify SQL Wizard settings when you invoke the End-User Report Designer using the ReportDesignTool class methods:

csharp
using DevExpress.XtraReports.UI;
// ...
ReportDesignTool designer = new ReportDesignTool(new XtraReport());
designer.DesignRibbonForm.DesignMdiController.DataSourceWizardSettings.
    SqlWizardSettings.DatabaseCredentialsSavingBehavior =  
    DevExpress.DataAccess.Wizard.SensitiveInfoSavingBehavior.Never;
designer.ShowRibbonDesigner();
vb
Imports DevExpress.XtraReports.UI
' ...
Private designer As New ReportDesignTool(New XtraReport())
designer.DesignRibbonForm.DesignMdiController.DataSourceWizardSettings.SqlWizardSettings.DatabaseCredentialsSavingBehavior = DevExpress.DataAccess.Wizard.SensitiveInfoSavingBehavior.Never
designer.ShowRibbonDesigner()

See Also

Data Access Security in WinForms Applications

SqlWizardSettings Class

SqlWizardSettings Members

DevExpress.DataAccess.UI.Wizard Namespace