开发者

My .net Datatable returns incorrect results when I select by a float

I have a datatable where one column is a float (a system.single). I'm trying to select the rows where that column ("Radius") is less than or equal to 2.5, but getting silly results. (I get 22 rows returned out of 192, but the Radius column of all those rows are greater than 2.5. I tried all kind开发者_如何学运维s of silly things like putting the value in single quotes, putting the column name in brackets, doing just plain less than... I'm stumped. Any ideas?


My actual code was too big (and a bit convoluted) to post here, but in the process of trying to factor it down to something manageable, I discovered my bug. I hadn't looked at a small abstraction layer, assuming the datarows were being passed straight through, but (of course) that's where my error was. Bad debugging on my part... thanks for your help.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜