mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-17 09:35:37 -05:00
Fix application names to respect connection's appname property (#2034)
This commit is contained in:
@@ -17,6 +17,7 @@ using Microsoft.SqlTools.ServiceLayer.TableDesigner.Contracts;
|
||||
using Dac = Microsoft.Data.Tools.Sql.DesignServices.TableDesigner;
|
||||
using STSHost = Microsoft.SqlTools.ServiceLayer.Hosting.ServiceHost;
|
||||
using Microsoft.SqlTools.ServiceLayer.SqlContext;
|
||||
using Microsoft.SqlTools.ServiceLayer.Connection;
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.TableDesigner
|
||||
{
|
||||
@@ -25,7 +26,7 @@ namespace Microsoft.SqlTools.ServiceLayer.TableDesigner
|
||||
/// </summary>
|
||||
public sealed class TableDesignerService : IDisposable
|
||||
{
|
||||
public const string TableDesignerApplicationName = "azdata-table-designer";
|
||||
public const string TableDesignerApplicationNameSuffix = "TableDesigner";
|
||||
|
||||
private Dictionary<string, Dac.TableDesigner> idTableMap = new Dictionary<string, Dac.TableDesigner>();
|
||||
private bool disposed = false;
|
||||
@@ -1798,7 +1799,7 @@ namespace Microsoft.SqlTools.ServiceLayer.TableDesigner
|
||||
{
|
||||
var connectionStringBuilder = new SqlConnectionStringBuilder(tableInfo.ConnectionString);
|
||||
connectionStringBuilder.InitialCatalog = tableInfo.Database;
|
||||
connectionStringBuilder.ApplicationName = TableDesignerService.TableDesignerApplicationName;
|
||||
connectionStringBuilder.ApplicationName = ConnectionService.GetApplicationNameWithFeature(connectionStringBuilder.ApplicationName, TableDesignerService.TableDesignerApplicationNameSuffix);
|
||||
var connectionString = connectionStringBuilder.ToString();
|
||||
|
||||
// Set Access Token only when authentication mode is not specified.
|
||||
|
||||
Reference in New Issue
Block a user