Bug with datatype char(8) ?
Posted: Thu 12 Nov 2009 16:12
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()
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()