Parameters of DbCommand not populated (bug?)

Parameters of DbCommand not populated (bug?)

Postby 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.
edwin
 
Posts: 19
Joined: Thu 08 Oct 2009 09:15

Postby 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

Postby AndreyR » Tue 13 Oct 2009 07:43

We have fixed the problem. Look forward to the nearest buid.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16


Return to dotConnect for Oracle