Ask a Question related to ASP.NET General, Design and Development.
-
Dan C Douglas #1
dr("field").toString returns "400.0000" instead of "400"
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]: 400Dreturns>? dr("CostsPerBin").toString
"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
Dan C Douglas Guest
-
"Page" and "Rect" props of the Field prop in Javascript API
Page property of the Field property in Javascript Acrobat API returns an array of pages that this field exists in. On the other hand, "rect" property... -
Proj cannot run on LCDS 2.6 ES due to "Unable to resolveresource bundle "datamanagement" for locale "en_US"
hi, all, We have developped an application on Flex Build 3 (run successfully), but failed when we try to deploy it on Tomcat with LCDS 2.5 ES... -
CFINPUT type="radio" w/ "value" requires "label"
On a Flash form, when you specify type='radio' and value='whatever', the value of the 'value' attribute will be displayed as a label if no 'label'... -
#26292 [Opn->Bgs]: substr returns "0" for any offset on the string "0"
ID: 26292 Updated by: sniper@php.net Reported By: ravacholp at hotmail dot com -Status: Open +Status: ... -
"Start" "Program" "Menu" list is empty
For what ever reason my list of installed programs in my "Start" "Programs" menu is empty. Anyone know how to restore the list. Thanks for your... -
Bob Barrows #2
Re: dr("field").toString returns "400.0000" instead of "400"
This is a classic asp newsgroup. While you may be lucky enough to find a
dotnet-savvy person here who can answer your question, you can eliminate the
luck factor by posting your question to an appropriate group. I suggest
microsoft.public.dotnet.framework.adonet or microsoft.public.dotnet.framework.aspnet.
HTH,
Bob Barrows
Bob Barrows Guest
-
Bob Barrows #3
Re: dr("field").toString returns "400.0000" instead of "400"
Yep - I replied to the wrong message, somehow. Sorry about that
"Dan C Douglas" <nottelling@nowhere.com> wrote in message news:%23Ybj1QGUDHA.1680@TK2MSFTNGP11.phx.gbl...
heh.. i think your looking at another message. I posted to
microsoft.public.dotnet.framework.adonet,
microsoft.public.dotnet.framework.aspnet,
microsoft.public.sqlserver.programming
-Dan
"Bob Barrows" <reb_01501@yahoo.com> wrote in message news:#49TgNGUDHA.612@TK2MSFTNGP12.phx.gbl...
This is a classic asp newsgroup. While you may be lucky enough to find a
dotnet-savvy person here who can answer your question, you can eliminate the
luck factor by posting your question to an appropriate group. I suggest
microsoft.public.dotnet.framework.adonet or microsoft.public.dotnet.framework.aspnet.
HTH,
Bob Barrows
Bob Barrows Guest
-
Mark Heimonen #4
Re: dr("field").toString returns "400.0000" instead of "400"
Yeah, we had to make some small code changes when switching over to the 1.1 framework as well. Our interface to PayPal broke because it considered more than 2 decimal places to be an invalid format.
-Mark
"Vik" <viktorum@==yahoo.com==> wrote in message news:ekfnO$GUDHA.1912@TK2MSFTNGP12.phx.gbl...
I have similar problem. Decimal zeros don't show on my machine (NET Framework 1.0) and show on a server (Framework 1.1). I couldn't find a reason and just use str = Format(tmp, "N").
Vik
"Dan C Douglas" <nottelling@nowhere.com> wrote in message news:uMnH3JGUDHA.1712@tk2msftngp13.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]: 400Dreturns>? dr("CostsPerBin").toString
"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
Mark Heimonen Guest
-
Dan C Douglas #5
Re: dr("field").toString returns "400.0000" instead of "400"
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" <bob@bobgrommes.com> wrote in message news:OXoGYlGUDHA.1864@TK2MSFTNGP11.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" <nottelling@nowhere.com> wrote in message news:uMnH3JGUDHA.1712@tk2msftngp13.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]: 400Dreturns>? dr("CostsPerBin").toString
"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
Dan C Douglas Guest
-
Dan C Douglas #6
Re: dr("field").toString returns "400.0000" instead of "400"
The app was mapped to 1.1.
I believe if I map it to 1.0 it should fix the problem.
Still. It's good to know how installing 1.1 may affect our existing apps when we install it on production. The install (according to MS) shouldn't of effected existing apps, but according to asp.net website it does.
I am fixing it now...
"Mark Heimonen" <markh@adiaim.com> wrote in message news:uMo5UGHUDHA.2200@TK2MSFTNGP11.phx.gbl...
Yeah, we had to make some small code changes when switching over to the 1.1 framework as well. Our interface to PayPal broke because it considered more than 2 decimal places to be an invalid format.
-Mark
"Vik" <viktorum@==yahoo.com==> wrote in message news:ekfnO$GUDHA.1912@TK2MSFTNGP12.phx.gbl...
I have similar problem. Decimal zeros don't show on my machine (NET Framework 1.0) and show on a server (Framework 1.1). I couldn't find a reason and just use str = Format(tmp, "N").
Vik
"Dan C Douglas" <nottelling@nowhere.com> wrote in message news:uMnH3JGUDHA.1712@tk2msftngp13.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]: 400Dreturns>? dr("CostsPerBin").toString
"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
Dan C Douglas Guest



Reply With Quote

