File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
src/GUI/SSMSToolbox/SSMSEngine Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -119,7 +119,11 @@ private MenuItem BuildMenuItemForCommandHandler()
119119 var parent = Parent ;
120120 if ( parent ? . Connection == null ) return null ;
121121
122- var builder = new SqlConnectionStringBuilder ( parent . Connection . ConnectionString ) ;
122+ var connectionString = parent . Connection . ConnectionString ;
123+
124+ connectionString = ReplaceMdsKeywords ( connectionString ) ;
125+
126+ var builder = new SqlConnectionStringBuilder ( connectionString ) ;
123127 builder . InitialCatalog = parent . InvariantName ;
124128
125129 var dbInfo = new DatabaseInfo
@@ -175,5 +179,12 @@ private ToolStripMenuItem BuildScriptMenuItem(System.Drawing.Bitmap scriptImage)
175179 scriptItem . DropDownItems . Add ( scriptItem5 ) ;
176180 return scriptItem ;
177181 }
182+
183+ private string ReplaceMdsKeywords ( string connectionString )
184+ {
185+ connectionString = connectionString . Replace ( "Multiple Active Result Sets=" , "MultipleActiveResultSets=" ) ;
186+ connectionString = connectionString . Replace ( "Trust Server Certificate=" , "TrustServerCertificate=" ) ;
187+ return connectionString ;
188+ }
178189 }
179190}
You can’t perform that action at this time.
0 commit comments