473,396 Members | 1,770 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Can't MOD in "Column[].Expression"

I have the following code line:
dsEmps.Tables[0].Columns["teste"].Expression = "MonthlyDeviation%60";

but hits gives an error it says that can't MOD from System.Double to
System.Int32

I tried to put the 60 in double and it says it can't do a MOD from
System.Double to System.Double....

I need to MOD that value in the expression column... does anybody knows a
solution to this problem?
Nov 17 '05 #1
4 1951
Convert(expression, type)
"Diogo Alves - Software Developer"
<Di*************************@discussions.microsoft .com> wrote in message
news:B7**********************************@microsof t.com...
I have the following code line:
dsEmps.Tables[0].Columns["teste"].Expression = "MonthlyDeviation%60";

but hits gives an error it says that can't MOD from System.Double to
System.Int32

I tried to put the 60 in double and it says it can't do a MOD from
System.Double to System.Double....

I need to MOD that value in the expression column... does anybody knows a
solution to this problem?

Nov 17 '05 #2
I've tried already to convert but it gives me the same error again and
agains, the only thing that is fidderent is the datatipes on the messege of
the exception

"W.G. Ryan MVP" wrote:
Convert(expression, type)
"Diogo Alves - Software Developer"
<Di*************************@discussions.microsoft .com> wrote in message
news:B7**********************************@microsof t.com...
I have the following code line:
dsEmps.Tables[0].Columns["teste"].Expression = "MonthlyDeviation%60";

but hits gives an error it says that can't MOD from System.Double to
System.Int32

I tried to put the 60 in double and it says it can't do a MOD from
System.Double to System.Double....

I need to MOD that value in the expression column... does anybody knows a
solution to this problem?


Nov 17 '05 #3
Have you tried:

Convert(MonthlyDeviation, 'System.Int32') % 60
Regards - Octavio

"Diogo Alves - Software Developer"
<Di*************************@discussions.microsoft .com> escribió en el
mensaje news:E8**********************************@microsof t.com...
I've tried already to convert but it gives me the same error again and
agains, the only thing that is fidderent is the datatipes on the messege
of
the exception

"W.G. Ryan MVP" wrote:
Convert(expression, type)
"Diogo Alves - Software Developer"
<Di*************************@discussions.microsoft .com> wrote in message
news:B7**********************************@microsof t.com...
>I have the following code line:
> dsEmps.Tables[0].Columns["teste"].Expression = "MonthlyDeviation%60";
>
> but hits gives an error it says that can't MOD from System.Double to
> System.Int32
>
> I tried to put the 60 in double and it says it can't do a MOD from
> System.Double to System.Double....
>
> I need to MOD that value in the expression column... does anybody knows
> a
> solution to this problem?


Nov 17 '05 #4
I have a strong reason to have a double in there.... if I convert to in it
just don't make sense anymore... anyway I solved the problem... I have done
another formula to calculate what I wanted...

Thanks anyway

"Octavio Hernandez" wrote:
Have you tried:

Convert(MonthlyDeviation, 'System.Int32') % 60
Regards - Octavio

"Diogo Alves - Software Developer"
<Di*************************@discussions.microsoft .com> escribió en el
mensaje news:E8**********************************@microsof t.com...
I've tried already to convert but it gives me the same error again and
agains, the only thing that is fidderent is the datatipes on the messege
of
the exception

"W.G. Ryan MVP" wrote:
Convert(expression, type)
"Diogo Alves - Software Developer"
<Di*************************@discussions.microsoft .com> wrote in message
news:B7**********************************@microsof t.com...
>I have the following code line:
> dsEmps.Tables[0].Columns["teste"].Expression = "MonthlyDeviation%60";
>
> but hits gives an error it says that can't MOD from System.Double to
> System.Int32
>
> I tried to put the 60 in double and it says it can't do a MOD from
> System.Double to System.Double....
>
> I need to MOD that value in the expression column... does anybody knows
> a
> solution to this problem?


Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Aaron Smith | last post by:
Ok. I have a dataset that has multiple tables in it. In one of the child tables, I have a column that I added to the DataSet (Not in the DataSource). This column does not need to be stored in the...
17
by: Darek | last post by:
Hi, I have a table, something similar to: create table my_table ( id char(32) not null primary key, num integer not null, code varchar(2) not null, name varchar(60) not null,
56
by: Adem | last post by:
C/C++ language proposal: Change the 'case expression' from "integral constant-expression" to "integral expression" The C++ Standard (ISO/IEC 14882, Second edition, 2003-10-15) says under...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.