how Cast/Convert numeric to string to perform like?linq/esql

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
joao88
Posts: 6
Joined: Wed 12 Jan 2011 20:42

how Cast/Convert numeric to string to perform like?linq/esql

Post by joao88 » Thu 13 Jan 2011 00:32

Hi, i try do this:

Code: Select all

 
string esql = "SELECT VALUE test  FROM Entities.test AS test WHERE CAST(test.NumeroRA as Edm.String) like @param";

ObjectQuery QueryTest = new ObjectQuery(esql, Context);
QueryTest .Parameters.Add(new ObjectParameter("param", "%'" +id.ToString() + "'%"))
but i get error:"Edm.String type no found", i want perform a like with a numeric value, so i want cast/convert field to use like operator...with sql server provider this query run fine, but when i try with devart provider i get this error, how i can peform a like with devart using linq or esql?

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

Post by AndreyR » Fri 14 Jan 2011 13:31

Thank you for the report, I have reproduced the issue.
However, the same problem is reproducible using SQL Server on my system.
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 » Tue 18 Jan 2011 14:23

The solution for the problem is to use System.String instead of Edm.String.

Post Reply