This question is locked. New answers and comments are not allowed.
This statement works fine:
using(UsersModel context = new UsersModel())
{
var query =
(from user
in context.UserTable
where user.UserId = "JoeBlow"
select user).FirstOrDefault();
}
However, this fails:
using(UsersModel context = new UsersModel())
{
string id = "JoeBlow";
var query =
(from user
in context.UserTable
where user.UserId = id
select user).FirstOrDefault();
}
It fails because the generated SQL translates the WHERE clause as "WHERE a.UserId = :p01"
Now I recognize this as an OracleParameter value, but OpenAccess should have generated the parameter with name "p01" and value id.
Is there a way to make OpenAccess generate this correctly, and if not, a way to programmatically add the OracleParameter so that the SQL will succeed?
Thanks,
Carl
using(UsersModel context = new UsersModel())
{
var query =
(from user
in context.UserTable
where user.UserId = "JoeBlow"
select user).FirstOrDefault();
}
However, this fails:
using(UsersModel context = new UsersModel())
{
string id = "JoeBlow";
var query =
(from user
in context.UserTable
where user.UserId = id
select user).FirstOrDefault();
}
It fails because the generated SQL translates the WHERE clause as "WHERE a.UserId = :p01"
Now I recognize this as an OracleParameter value, but OpenAccess should have generated the parameter with name "p01" and value id.
Is there a way to make OpenAccess generate this correctly, and if not, a way to programmatically add the OracleParameter so that the SQL will succeed?
Thanks,
Carl