Bug in calling Select when criteria involves an expression column?

  • Thread starter Thread starter Marina
  • Start date Start date
M

Marina

Hi,

I have an expression column (integer). This column gets populated
correctly.

I then have a Select, that is:

dt.Select("Calc = " & dt.Compute("Min(Calc)", "") & "")

Now, as you see, first I am computing the minimum value of the column, and
then using that in the select. Now, this HAS to return at least 1 row,
since Compute is returning the value in one of the rows, hence Select has to
find that row.

But, for certain number it does not. Now, I can clearly see in the
debugger, that dt.Rows(121)("Calc") = 1514. I can also see that
Compute("Min(Calc)", "") = 1514. So they are completely identical. So, at
the very least, Select should return the 121'st row.

In my debugger, I try to Select other known values of Calc. Some of them
are found correctly - but others, just like 1514, are not.

As I've never experienced a problem with Select and regular fields, my
thinking is that this is some sort of odd expression field bug?

Any ideas?
 
By the way, if I set up a DataView, with a filter criteria, that is
identical to what I am using in the Select method. Then everything works as
it is supposed to.
 
Marina,

Do you've a simple repro for the issue you are seeing with Select below. If
possible, you can dump the dataset schema and data you've into XML and send
it over. We'll investigate it.

Thanks,
Ravi
 
Marina,

Thanks for sending the sample case. To repro this we need a little bit more
data. Can you send what the "Color" and "KnownColor" enumerations look like
in your repro?

-Ravi
 
Marina,

Are you still experiencing the problem? I was not able to repro with the
attached code. If you are still seeing this problem let us know and we will
look into this.

Thanks,Ravi

Ravi said:
Marina,

I'm not able to repro the issue. Probably I'm missing something here. I've
used the exact repro you've sent [converted to C#] and the output is as you
expected i.e dt.Select returns 1 row.
I'm attaching the code I've used, in case you'll spot something which I'm
missing in my repro.

Thanks
Ravi
Marina said:
These are the enumerations from System.Drawing. These are not my own.
isn't
least
1 in
the Some
 
Back
Top