Fix application names to respect connection's appname property (#2034)

This commit is contained in:
Cheena Malhotra
2023-04-28 13:39:33 -07:00
committed by GitHub
parent 35aa8d42de
commit f66a203c01
5 changed files with 19 additions and 19 deletions

View File

@@ -399,7 +399,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer
{
var builder = ConnectionService.CreateConnectionStringBuilder(session.ConnectionInfo.ConnectionDetails);
builder.InitialCatalog = node.NodeValue;
builder.ApplicationName = TableDesignerService.TableDesignerApplicationName;
builder.ApplicationName = ConnectionService.GetApplicationNameWithFeature(builder.ApplicationName, TableDesignerService.TableDesignerApplicationNameSuffix);
// Set Access Token only when authentication mode is not specified.
var azureToken = builder.Authentication == SqlAuthenticationMethod.NotSpecified
? session.ConnectionInfo.ConnectionDetails.AzureAccountToken : null;