PC Review


Reply
Thread Tools Rate Thread

ADO.NET Expressions fall short

 
 
Bob L.
Guest
Posts: n/a
 
      9th Feb 2005
Hi everyone,

A part of our system deals with using DataViews, and it appears that the
RowFilter property (DataColumn.Expression syntax) does not support the
following:

1) Bitwise operators
2) Integer division
3) Rounding

My real issue is that I need to filter based on check one or more bits in an
integer field. Failing to find support for that, I looked to solve it using
integer division. Again being thwarted, I turned to some kind of rounding on
the floating point division. 0-for3.

Is Microsoft really that careless, or am I missing something (or both)?

Thanks,
Bob L.


 
Reply With Quote
 
 
 
 
Sahil Malik
Guest
Posts: n/a
 
      9th Feb 2005
I've answered this question before over here -
http://groups-beta.google.com/group/...593be4c42e2c9e

In there I used a simple rounding mechanism to evaluate a 2 digit decimal
precision out of a decimal, but you can easily implement rounding. You can
then compare the rounded and the floating point value to check for validity
of the integer.

Now there are more than one ways to skin a cat, but if you must use
DataColumn, you can do the above, but seriously that is like a gynaecologist
mechanic, you're trying to fix a car from it's exhaust pipe frankly.

Now for your specific case, why can't you just inherit from a datatable and
create your very own "strongly typed datatable" and encapsulate this logic
in it?

- Sahil Malik
http://codebetter.com/blogs/sahil.malik/





"Bob L." <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi everyone,
>
> A part of our system deals with using DataViews, and it appears that the
> RowFilter property (DataColumn.Expression syntax) does not support the
> following:
>
> 1) Bitwise operators
> 2) Integer division
> 3) Rounding
>
> My real issue is that I need to filter based on check one or more bits in

an
> integer field. Failing to find support for that, I looked to solve it

using
> integer division. Again being thwarted, I turned to some kind of rounding

on
> the floating point division. 0-for3.
>
> Is Microsoft really that careless, or am I missing something (or both)?
>
> Thanks,
> Bob L.
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
When amortising a loan based using an IRR rate, the total interestpaid fall short. barefootbroker Microsoft Excel Worksheet Functions 0 26th Jun 2008 01:00 PM
Grammar revisions and synonyms fall short =?Utf-8?B?QWw=?= Microsoft Word Document Management 0 18th Sep 2007 12:46 AM
ASUS A7V133 Boot Fail (long, short, short beep code) Brent L. Harritt Asus Motherboards 5 26th Nov 2003 08:21 AM
Add custom regular expressions to the validation list of available expressions Jay Douglas Microsoft Dot NET Framework 0 16th Aug 2003 12:25 AM
Add custom regular expressions to the validation list of available expressions Jay Douglas Microsoft ASP .NET 0 15th Aug 2003 11:19 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:33 AM.