Entity Framework EndsWith error - ORA-10136: illegal variabl

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
justins
Posts: 2
Joined: Thu 11 Feb 2010 17:12

Entity Framework EndsWith error - ORA-10136: illegal variabl

Post by justins » Thu 11 Feb 2010 17:22

Hi, I'm trying to execute the following linq query:

Code: Select all

Dim names As List(Of CO_NAME) = (From n As CO_NAME In model.CO_NAME Where n.COMPANY_NAME.EndsWith(str) Select n).ToList
(where str is a string variable) and I'm getting a Devart.Data.Oracle.OracleException:
"ORA-01036: illegal variable name/number"

Using DbMonitor, I see the following PREPARE line:

Code: Select all

SELECT 
1 AS C1, 
"Extent1".NAME_ID AS NAME_ID, 
"Extent1".COMPANY_NAME AS COMPANY_NAME, 
"Extent1".DO_BUS_AS_FLAG AS DO_BUS_AS_FLAG, 
"Extent1".DATE_ENDED AS DATE_ENDED, 
"Extent1".MODIFIEDBY AS MODIFIEDBY, 
"Extent1".DATEMODIFIED AS DATEMODIFIED, 
"Extent1".COMPANY_ID AS COMPANY_ID
FROM AIP.CO_NAME "Extent1"
WHERE "Extent1".COMPANY_NAME LIKE '%' || :p__linq__2
The exception is caused by the EndsWith clause. Can anyone see why this would result in that exception?

What's really weird is that if I change EndsWith to StartsWith, the query executes successfully, with the following SQL:

Code: Select all

SELECT 
1 AS C1, 
"Extent1".NAME_ID AS NAME_ID, 
"Extent1".COMPANY_NAME AS COMPANY_NAME, 
"Extent1".DO_BUS_AS_FLAG AS DO_BUS_AS_FLAG, 
"Extent1".DATE_ENDED AS DATE_ENDED, 
"Extent1".MODIFIEDBY AS MODIFIEDBY, 
"Extent1".DATEMODIFIED AS DATEMODIFIED, 
"Extent1".COMPANY_ID AS COMPANY_ID
FROM AIP.CO_NAME "Extent1"
WHERE "Extent1".COMPANY_NAME LIKE :p__linq__1 || '%'
Thanks

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Fri 12 Feb 2010 15:47

Thank you for the report, I have reproduced the problem.
I will let you know about the results of our investigation.

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Mon 15 Feb 2010 15:24

We have fixed the problem. The fix will be available in the nearest build.

justins
Posts: 2
Joined: Thu 11 Feb 2010 17:12

Post by justins » Mon 15 Feb 2010 19:23

That's great, thanks!

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Fri 19 Feb 2010 10:07

New build of dotConnect for Oracle 5.55.97 Beta is available for download now.
Please let me know if something goes wrong.

Post Reply