Parameters of DbCommand not populated (bug?)

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
edwin
Posts: 19
Joined: Thu 08 Oct 2009 09:15

Parameters of DbCommand not populated (bug?)

Post by edwin » Thu 08 Oct 2009 09:23

Hello,

I have the following problem (example code):

var query = context.Chauffeurs.Where(x => x.Id == 42);
int i = context.GetCommand(query).Parameters.Count;

In this case, the context.GetCommand(query) should give you a DbCommand that has a Parameters collection with one parameter, for the 42, but instead the Parameters collection is empty (i==0), resulting in an error on execute:

ORA-01008: not all variables bound

When you inspect context.GetCommand(query).CommandText you see the parameter :p0

"SELECT t1.ID, t1.NAAM\r\nFROM Z9C_JUIST.CHAUFFEUR t1\r\nWHERE t1.ID = :p0"

Anyone any idea how I can get the Parameters collection to automatically populate from an IQueryable?

Kind regards,

Edwin.

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

Post by AndreyR » Fri 09 Oct 2009 12:59

Thank you for the report.
I will let you know as soon as the problem is fixed.

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

Post by AndreyR » Tue 13 Oct 2009 07:43

We have fixed the problem. Look forward to the nearest buid.

Post Reply