corelibraries-devexpress-dot-dataaccess-dot-dataconnectionbase.md
Specifies whether to serialize any connection settings except for the data connection name.
Namespace : DevExpress.DataAccess
Assembly : DevExpress.DataAccess.v25.2.dll
NuGet Package : DevExpress.DataAccess
[Browsable(false)]
public bool StoreConnectionNameOnly { get; set; }
<Browsable(False)>
Public Property StoreConnectionNameOnly As Boolean
| Type | Description |
|---|---|
| Boolean |
true , to store only the name of a data connection; otherwise, false.
|
When this option is enabled, the connection parameters are restored from the application configuration file by using the deserialized connection name.
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.
When this property is disabled, the behavior depends on the SqlWizardSettings.DatabaseCredentialsSavingBehavior and IConnectionStorageService.CanSaveConnection property values.
|
|
Behavior
| | --- | --- | |
SensitiveInfoSavingBehavior.Prompt
|
IConnectionStorageService.CanSaveConnection is set to true
IConnectionStorageService.CanSaveConnection is set to false
| |
SensitiveInfoSavingBehavior.Always or SensitiveInfoSavingBehavior.Never
|
Users cannot specify whether or not 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.
IConnectionStorageService.CanSaveConnection is set to true
IConnectionStorageService.CanSaveConnection is set to false
|
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the StoreConnectionNameOnly 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.
new CustomStringConnectionParameters(node["ConnectionString"].InnerText));
connection.StoreConnectionNameOnly = true;
result.Add(connection);
Dim connection As New CustomSqlDataConnection(connectionName, New CustomStringConnectionParameters(node("ConnectionString").InnerText))
connection.StoreConnectionNameOnly = True
result.Add(connection)
See Also