Remove invalid SET option for SqlOnDemand (#1147)

This commit is contained in:
Charles Gagnon
2021-01-11 09:08:50 -08:00
committed by GitHub
parent 97d7547feb
commit 822ffb2908
2 changed files with 4 additions and 11 deletions

View File

@@ -623,7 +623,8 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution
// "set noexec off" should be the very first command, cause everything after
// corresponding "set noexec on" is not executed until "set noexec off"
// is encounted
if (!settings.NoExec)
// NOEXEC is not currently supported by SqlOnDemand servers
if (!settings.NoExec && connection.EngineEdition != SqlServer.Management.Common.DatabaseEngineEdition.SqlOnDemand)
{
builderBefore.AppendFormat("{0} ", helper.SetNoExecString);
}
@@ -684,7 +685,8 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution
// "set noexec on" should be the very last command, cause everything after it is not
// being executed unitl "set noexec off" is encounered
if (settings.NoExec)
// NOEXEC is not currently supported by SqlOnDemand servers
if (settings.NoExec && connection.EngineEdition != SqlServer.Management.Common.DatabaseEngineEdition.SqlOnDemand)
{
builderBefore.AppendFormat("{0} ", helper.SetNoExecString);
}