Re: Strange Divide? Error
- From: WhiteWizard <WhiteWizard@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 31 Jul 2006 05:53:01 -0700
Thanks for the response, but I checked the problem machine, and both of those
registry entries show an empty string.
While I love puzzles like this as much as the next guy, this is getting
REALLY ridiculous! ;)
WhiteWizard
aka Gandalf
MCSD.NET, MCAD, MCT
"Claes Bergefall" wrote:
You should be able to change them in the registry at.
HKEY_CURRENT_USER\Control Panel\International
or
HKEY_USERS\.DEFAULT\Control Panel\International
The value your looking for is sPositiveSign. It is set to an empty string on
my machine
/claes
"WhiteWizard" <WhiteWizard@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:733A5C0F-410F-44AF-8C39-55634A91E054@xxxxxxxxxxxxxxxx
I have good news and bad news.
The good news is that with Ignacio's suggestion we checked the
NumberFormatInfo parameters and found that for the problem machines the
PositiveSign Value is a 0, but only for en-US and only on the problem
machines.
I also verified that this is what was causing the problem by temporarily
changing my value to a 0 and got the errors.
The bad news is I cannot find any way to change the value back to a + sign
as it is on the non-problem machines and for all other culture settings.
I
also have no idea HOW the bad ones were set to 0 in the first place.
I found where you can change how the system treats negative numbers, but
nothing so far on setting the PositiveSign value. Has anyone seen this
before, or can anyone tell me how I might change the PositiveSign value?
Thanks for your responses earlier. It definitely helped us isolate the
problem.
WhiteWizard
aka Gandalf
MCSD.NET, MCAD, MCT
"Ignacio Machin ( .NET/ C# MVP )" wrote:
Hi,
You have some error in the format of the number, can you post the code in
question?
Also compare one working machine and one with the error regarding the
culture being used , especifucally the NumberFormatInfo benig used.
--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"WhiteWizard" <WhiteWizard@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:9A327A82-1E12-4DA2-9486-2A03C33C0410@xxxxxxxxxxxxxxxx
Have we got a STRANGE one going here.
We converted from 1.1 to 2.0 about 2 weeks ago and this has been a
problem
since then...but only on SOME machines in our development group. The
application runs fine using 1.1 and on 3 of the 8 machines in our
group.
It
is a Windows application.
Our appliation has many user controls, and panels/viewing areas that we
show
in our app. In our application we several areas where we have to take
a
string and parse it into other data types; for
instance--ushort.parse(strSysID). On the problem machines this
generates
the
following build error:
A first chance exception of type 'System.FormatException' occurred in
mscorlib.dll
TestPointSpec: Error TP 774 not a number 0 System.FormatException:
Input
string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options,
NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseUInt32(String value, NumberStyles options,
NumberFormatInfo numfmt)
at System.UInt16.Parse(String s, NumberStyles style, NumberFormatInfo
info)
at System.UInt16.Parse(String s)
at
ConfigurationFiles.TestPointSpecificationFile.ParseEnumeration(UInt16
specID, String wholeEnum) in D:\C-5 RERP\PVCS
7-26-06\Common\ConfigurationFiles\TestPointSpecificationFile.cs:line
357
In other parts of the application, we may be using the string in a
different
way(ie. we use the string/convert it to an int and use it as an index),
and
it gets past the build process, but at run time generates the following
error, when trying to use a "0" in a string:
System.FormatException was unhandled
Message="Input string was not in a correct format."
Source="mscorlib"
StackTrace:
at System.Number.StringToNumber(String str, NumberStyles options,
NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseUInt32(String value, NumberStyles options,
NumberFormatInfo numfmt)
at System.UInt16.Parse(String s, NumberStyles style,
NumberFormatInfo
info)
at System.UInt16.Parse(String s)
at
ApplicationFrame.SubsystemBrowserControl.GetSelectedRows(DataGrid
dg) in D:\C-5 RERP\PVCS
7-26-06\PCIU_CSCI\UserInterfaceComponents\SubsystemBrowserControl.cs:line
1290
at
ApplicationFrame.SubsystemBrowserControl.addTPmenuItem_Click(Object
sender,
EventArgs e) in D:\C-5 RERP\PVCS
7-26-06\PCIU_CSCI\UserInterfaceComponents\SubsystemBrowserControl.cs:line
1052
We know it has something to do with having a "0" in a string, but have
NO
idea, of why it happens on only some of the machines and not all
(luckily
I'm
not one of the problem machines), and also why it works with 1.1
version
of
the framework, and not 2.0.
Anyone have any ideas of what the problem is, or where we start
looking?
My apologies for the length of the post. Thanks in advance for any
help.
WhiteWizard
aka Gandalf
MCSD.NET, MCAD, MCT
- References:
- Re: Strange Divide? Error
- From: Ignacio Machin \( .NET/ C# MVP \)
- Re: Strange Divide? Error
- From: WhiteWizard
- Re: Strange Divide? Error
- From: Claes Bergefall
- Re: Strange Divide? Error
- Prev by Date: Re: synchronization issue
- Next by Date: Re: Collection
- Previous by thread: Re: Strange Divide? Error
- Next by thread: Re: Strange Divide? Error
- Index(es):
Relevant Pages
|