File tree Expand file tree Collapse file tree
src/EFCore.Jet/Query/ExpressionTranslators/Internal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -276,6 +276,10 @@ private SqlExpression TranslateIndexOf(
276276 ? _sqlExpressionFactory . Constant ( constantStartIndex + 1 , typeof ( int ) )
277277 : _sqlExpressionFactory . Add ( startIndex , _sqlExpressionFactory . Constant ( 1 ) ) ) ;
278278 }
279+ else
280+ {
281+ charIndexArguments . Insert ( 0 , _sqlExpressionFactory . Constant ( 1 ) ) ;
282+ }
279283 charIndexArguments . Add ( _sqlExpressionFactory . Constant ( 1 ) ) ;
280284
281285 var argumentsPropagateNullability = Enumerable . Repeat ( true , charIndexArguments . Count ) ;
@@ -286,7 +290,7 @@ private SqlExpression TranslateIndexOf(
286290 || string . Equals ( storeType , "varchar(max)" , StringComparison . OrdinalIgnoreCase ) )
287291 {
288292 charIndexExpression = _sqlExpressionFactory . Function (
289- "InStr " ,
293+ "INSTR " ,
290294 charIndexArguments ,
291295 nullable : true ,
292296 argumentsPropagateNullability ,
@@ -297,7 +301,7 @@ private SqlExpression TranslateIndexOf(
297301 else
298302 {
299303 charIndexExpression = _sqlExpressionFactory . Function (
300- "InStr " ,
304+ "INSTR " ,
301305 charIndexArguments ,
302306 nullable : true ,
303307 argumentsPropagateNullability ,
You can’t perform that action at this time.
0 commit comments