Hi,
i have a problem with DevartProvider 5.25.49, EntityFramework and Oracle 10i
Lets assume there is a table "Families" with a column "FamilyName" of type char(8).
Now, i want query (in c#) the family name with following statement, which works great.
Example1:
var result = (from table in familyEntities.Families
where table.FAMILYNAME == "Meier"
select table).FirstOrDefault();
But now, if i use a parameter, the result will be null.
Example2:
string name = "Meier";
var result = (from table in familyEntities.Families
where table.FAMILYNAME == name
select table).FirstOrDefault();
the only difference in the generated sql syntax is:
Example 1: ... WHERE 'Meier' = "Extent1".FAMILYNAME
Example 2: ... WHERE "Extent1".FAMILYNAME = :p__linq__1
.. but that should be ok.
Iam not sure if this a problem with entity framework or devart provider.
Any ideas?
regards, Holger
PS. both examples works well if the colum type is varchar()
Bug with datatype char(8) ?
The SQL query executed using pure ADO.NET code (OracleCommand) gives the same result.
We recommend using the explicit Trim() call in case one is using the char columns and parameter comparison,
like in the following example:
We recommend using the explicit Trim() call in case one is using the char columns and parameter comparison,
like in the following example:
Code: Select all
where table.FAMILYNAME.Trim() == name