diff --git a/MarkMpn.Sql4Cds.Engine/Ado/Sql4CdsCommand.cs b/MarkMpn.Sql4Cds.Engine/Ado/Sql4CdsCommand.cs index 0610529f..cdcc13be 100644 --- a/MarkMpn.Sql4Cds.Engine/Ado/Sql4CdsCommand.cs +++ b/MarkMpn.Sql4Cds.Engine/Ado/Sql4CdsCommand.cs @@ -272,7 +272,7 @@ protected override DbDataReader ExecuteDbDataReader(CommandBehavior behavior) var cmd = con.CreateCommand(); cmd.CommandTimeout = (int)TimeSpan.FromMinutes(2).TotalSeconds; - cmd.CommandText = SqlNode.ApplyCommandBehavior(CommandText, behavior, new NodeExecutionContext(null, _connection.Options, null, null, null)); + cmd.CommandText = SqlNode.ApplyCommandBehavior(CommandText, behavior, new NodeExecutionContext(_connection.Session, _connection.Options, null, null, null)); var node = new SqlNode { Sql = cmd.CommandText, DataSource = _connection.Database }; cmd.StatementCompleted += (_, e) => {