Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
> operator vs. datarow column of System.Decimal type?
Message
General information
Forum:
ASP.NET
Category:
ADO.NET
Miscellaneous
Thread ID:
00855035
Message ID:
00855060
Views:
16
FWIW, I found a workaround (below), but I'd still be very interested in learning a way to do this without a data type conversion. Thanks.
// Convert the value about 27 times to determine whether it's greater than 0.
// TODO: Find a better way! :)
if (Int32.Parse(drQuery["SalesMin"].ToString())  > 0 )
>Newbie ADO.NET / C# question here. I have a datarow with a column of System.Decimal (Number(0) in Oracle) type and I want to find out whether that column's value is > 0.
>
>When I try the code below, I'm told "Operator '>' cannot be applied to operands of type 'object' and 'int'."
>
>if (drQuery["SalesMin"] > 0 )
Previous
Reply
Map
View

Click here to load this message in the networking platform