471,599 Members | 1,811 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,599 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 1865
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 discussion thread is closed

Replies have been disabled for this discussion.

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.