corelibraries-devexpress-dot-dataaccess-dot-sql-dot-configuredataconnectioneventargs-a2375732.md
Gets the name of the connection for which the event has been raised.
Namespace : DevExpress.DataAccess.Sql
Assembly : DevExpress.DataAccess.v25.2.dll
NuGet Package : DevExpress.DataAccess
public string ConnectionName { get; }
Public ReadOnly Property ConnectionName As String
| Type | Description |
|---|---|
| String |
A String that specifies the name of the connection for which the event has been raised.
|
Use the ConnectionName property to identify the currently processed connection. To access parameters of this connection, use the ConfigureDataConnectionEventArgs.ConnectionParameters property.
The following code snippets (auto-collected from DevExpress Examples) contain references to the ConnectionName 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.
private void ASPxDashboardOlap_ConfigureDataConnection(object sender, ConfigureDataConnectionWebEventArgs e) {
if (e.ConnectionName == "olapConnection") {
OlapConnectionParameters olapParams = new OlapConnectionParameters();
private static void Configurator_ConfigureDataConnection(object sender, ConfigureDataConnectionWebEventArgs e) {
if (e.ConnectionName == "olapConnection") {
OlapConnectionParameters olapParams = new OlapConnectionParameters();
private static void Configurator_ConfigureDataConnection(object sender, ConfigureDataConnectionWebEventArgs e) {
if (e.ConnectionName == "olapConnection") {
OlapConnectionParameters olapParams = new OlapConnectionParameters();
configurator.ConfigureDataConnection += (s,e) => {
if (e.ConnectionName == "jsonSupport") {
Uri fileUri = new Uri(fileProvider.GetFileInfo("Data/Support.json").PhysicalPath, UriKind.RelativeOrAbsolute);
dashboard-blazor-server-js-customization/CS/BlazorDashboardApp/Code/DashboardUtils.cs#L16
configurator.ConfigureDataConnection += (s, e) => {
if (e.ConnectionName == "jsonSupport") {
Uri fileUri = new Uri(fileProvider.GetFileInfo("Data/Support.json").PhysicalPath, UriKind.RelativeOrAbsolute);
Private Sub ASPxDashboardOlap_ConfigureDataConnection(ByVal sender As Object, ByVal e As ConfigureDataConnectionWebEventArgs)
If Equals(e.ConnectionName, "olapConnection") Then
Dim olapParams As OlapConnectionParameters = New OlapConnectionParameters()
Private Shared Sub Configurator_ConfigureDataConnection(ByVal sender As Object, ByVal e As ConfigureDataConnectionWebEventArgs)
If e.ConnectionName = "olapConnection" Then
Dim olapParams As New OlapConnectionParameters()
Dim databasePath As String = HostingEnvironment.MapPath("~/App_Data/nwind.mdb")
If e.ConnectionName = "Northwind connection" Then
e.ConnectionParameters = New Access97ConnectionParameters(databasePath, "", "")
WebFormsDashboardConfigurator/VB/WebFormsDashboardConfigurator/Global.asax.vb#L39
Private Sub Default_ConfigureDataConnection(ByVal sender As Object, ByVal e As ConfigureDataConnectionWebEventArgs)
If e.ConnectionName = "olapConnection" Then
Dim olapParams As New OlapConnectionParameters()
aspnet-mvc-dashboard-data-federation/VB/MVC_DataFederationExample/App_Start/DashboardConfig.vb#L61
Private Shared Sub Default_ConfigureDataConnection(ByVal sender As Object, ByVal e As ConfigureDataConnectionWebEventArgs)
If e.ConnectionName = "excelSales" Then
TryCast(e.ConnectionParameters, ExcelDataSourceConnectionParameters).FileName = HostingEnvironment.MapPath("~/App_Data/SalesPerson.xlsx")
See Also
ConfigureDataConnectionEventArgs Class