mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-16 18:47:57 -05:00
Fix support for SQL DW in Edit Data scenarios (#379)
- SQL DW does not support SESSIONPROPERTY. Verified that the correct return values are "true" for both values on all DW instances
This commit is contained in:
@@ -512,6 +512,14 @@ SET NUMERIC_ROUNDABORT OFF;";
|
||||
Tuple<string,bool>[] sessionSettings = new Tuple<string,bool>[2];
|
||||
|
||||
IDbConnection connection = originalCommand.Connection;
|
||||
if (IsSqlDwConnection(connection))
|
||||
{
|
||||
// SESSIONPROPERTY is not supported. Use default values for now
|
||||
sessionSettings[0] = Tuple.Create("ANSI_NULLS", true);
|
||||
sessionSettings[1] = Tuple.Create("QUOTED_IDENTIFIER", true);
|
||||
}
|
||||
else
|
||||
{
|
||||
using (IDbCommand localCommand = connection.CreateCommand())
|
||||
{
|
||||
// Executing a reader requires preservation of any pending transaction created by the calling command
|
||||
@@ -529,9 +537,10 @@ SET NUMERIC_ROUNDABORT OFF;";
|
||||
Debug.Assert(false, "Reader cannot be empty");
|
||||
}
|
||||
}
|
||||
return sessionSettings;
|
||||
}
|
||||
}
|
||||
return sessionSettings;
|
||||
}
|
||||
|
||||
private void SetSessionSettings(IDbConnection connection, params Tuple<string, bool>[] settings)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user