From 9464868c1daccec1265488bedef97f983a6bbe63 Mon Sep 17 00:00:00 2001 From: Christopher Jolly Date: Mon, 27 Feb 2023 20:45:32 +0800 Subject: [PATCH] Reverse the order of the indices. We need to work backwards on the string to keep the indices correct --- src/EFCore.Jet.Data/JetCommand.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EFCore.Jet.Data/JetCommand.cs b/src/EFCore.Jet.Data/JetCommand.cs index 11f955e..a6f35e6 100644 --- a/src/EFCore.Jet.Data/JetCommand.cs +++ b/src/EFCore.Jet.Data/JetCommand.cs @@ -499,7 +499,7 @@ namespace EntityFrameworkCore.Jet.Data where T : struct { var parser = new JetCommandParser(commandText); - var globalVariableIndices = parser.GetStateIndices('$'); + var globalVariableIndices = parser.GetStateIndices('$').Reverse(); var placeholderValue = new Lazy(() => valueFactory(this, placeholder)); var newCommandText = new StringBuilder(commandText);