Hi,
this happens on MySQL, not sure about other databases.
Problem: Instead of creating a WHERE statement like this: "WHERE SomeColumn LIKE '%~test123%'" the following statement is created: "WHERE SomeColumn LIKE '%~test123%' ESCAPE '~'".
Question: How do I get rid of that "ESCAPE '~'" thing? In dotConnect there seems to be a property called NoEscapeLike but I can't find that in LinqConnect.
LinqConnect version is 8.3.283.0
How to remove "ESCAPE '~'" from WHERE statement?
Re: How to remove "ESCAPE '~'" from WHERE statement?
Thank you for the report on this. We will investigate this issue more clearly and inform you about the results as soon as any are available.
As a temporary workaround, you could try using this code:
in this case the generated SQL query will look like this:
Please tell us if this helps.
As a temporary workaround, you could try using this code:
Code: Select all
var query = from c in ctx.DEPTs where SqlMethods.Like(c.LOC,"%~test123%") select c;
Code: Select all
SELECT t1.DEPTNO, t1.DNAME, t1.LOC
FROM test_m.DEPTs t1
WHERE t1.LOC LIKE :p0
-- p0: Input VarChar (Size = 10; DbType = AnsiString) [%~test123%]
Re: How to remove "ESCAPE '~'" from WHERE statement?
Yes, thank you. That did work!
Before I used IndexOf, which allowed me to specify wether I wanted the LIKE search to be case sensitive or not. Meaning, I'd appreciate it very much if it'd be fixed in a way that would allow me to go back to using IndexOf.
Anyway, hope you have a great day
Before I used IndexOf, which allowed me to specify wether I wanted the LIKE search to be case sensitive or not. Meaning, I'd appreciate it very much if it'd be fixed in a way that would allow me to go back to using IndexOf.
Anyway, hope you have a great day
Re: How to remove "ESCAPE '~'" from WHERE statement?
We have fixed this issue. The fix will be included in the next public build of LinqConnect."WHERE SomeColumn LIKE '%~test123%' ESCAPE '~'".
We will post here when it is released.
Re: How to remove "ESCAPE '~'" from WHERE statement?
New build of LinqConnect 4.4.735 is available!
It can be downloaded from http://www.devart.com/linqconnect/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=31&t=31666.
It can be downloaded from http://www.devart.com/linqconnect/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=31&t=31666.