For example we are using currency fields for large dollar amounts.
So for a dollar amount the user wants to see: 850,190, and not 850,190.0000
The difference is that the one machine with different results also has framework 1.1 side by side with 1.0 (even though the app should be using 1.0)
Surprisingly cost per bin are at a dollar value, but this issue has affected hundreds of fields that never had that problem before, so it goes belong just this one field.
And yes, in this case, I'd like to drop any trailing 0 decimals (this was done automatically before) w/o making any major modifications to the app. It just seems silly that by installing .NET Framework 1.1 that this would affect my apps running the original Framework 1.0
"Bob Grommes" <bo*@bobgrommes .com> wrote in message news:OX******** ******@TK2MSFTN GP11.phx.gbl...
I don't know why you'd get different results on one machine vs another, but you can simply tell ToString() exactly what you want and that will remove any ambiguity, now or in the future -- for example:
? dr("CostsPerBin ").ToString("F0 ");
I question, though, why you want to drop the decimal positions. Seems like cost per bin would not often be exactly at a dollar boundary. Or are you saying you just want to drop the decimals if they are all zero? Not sure if there's a standard format string that would produce that effect by itself.
--Bob
"Dan C Douglas" <no********@now here.com> wrote in message news:uM******** ******@tk2msftn gp13.phx.gbl...
I have just installed VS.NET 2003 on my computer. I have a project that I have been developing on VS.NET 2002. I haven't upgraded this project to VS.NET 2003 yet and I am still developing it in VS.NET 2002.
When I am putting values from my SQLDataReader into labels and text boxes I am getting results such as 400.0000, or 25.90.
For example...
? dr("CostsPerBin ")
returns
400D {Decimal}
[Decimal]: 400D
? dr("CostsPerBin ").toString
returns
"400.0000"
It used to return "400" before I installed VS.NET2K3
Obviously it is returning 4 decimals because it is the scale of the data type in SQL. This is a money field, although other fields that are decimal with a scale of 2 return results such as 90.40 when converted to a string.
Any ideas?
It works normally on our dev box and production server and also on other developers machines.
I am the only one in the office who has install VS.NET2K3, but I don't understand how it would change these results.
Is this a feature of .NET Framework 1.1 ? (project is still .NET framework 1.0 as I didn't upgrade it though)
Thanks,
Dan