473,406 Members | 2,439 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,406 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 1952
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
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.