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

G

Guest

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?
 
G

Guest

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 said:
Convert(expression, type)
"Diogo Alves - Software Developer"
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?
 
O

Octavio Hernandez

Have you tried:

Convert(MonthlyDeviation, 'System.Int32') % 60


Regards - Octavio

"Diogo Alves - Software Developer"
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 said:
Convert(expression, type)
"Diogo Alves - Software Developer"
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?
 
G

Guest

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 said:
Have you tried:

Convert(MonthlyDeviation, 'System.Int32') % 60


Regards - Octavio

"Diogo Alves - Software Developer"
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 said:
Convert(expression, type)
"Diogo Alves - Software Developer"
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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top