473,796 Members | 2,464 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Strange Divide? Error

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(st rSysID). On the problem machines this generates the
following build error:

A first chance exception of type 'System.FormatE xception' occurred in
mscorlib.dll
TestPointSpec: Error TP 774 not a number 0 System.FormatEx ception: Input
string was not in a correct format.
at System.Number.S tringToNumber(S tring str, NumberStyles options,
NumberBuffer& number, NumberFormatInf o info, Boolean parseDecimal)
at System.Number.P arseUInt32(Stri ng value, NumberStyles options,
NumberFormatInf o numfmt)
at System.UInt16.P arse(String s, NumberStyles style, NumberFormatInf o info)
at System.UInt16.P arse(String s)
at ConfigurationFi les.TestPointSp ecificationFile .ParseEnumerati on(UInt16
specID, String wholeEnum) in D:\C-5 RERP\PVCS
7-26-06\Common\Confi gurationFiles\T estPointSpecifi cationFile.cs:l ine 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.FormatEx ception was unhandled
Message="Input string was not in a correct format."
Source="mscorli b"
StackTrace:
at System.Number.S tringToNumber(S tring str, NumberStyles options,
NumberBuffer& number, NumberFormatInf o info, Boolean parseDecimal)
at System.Number.P arseUInt32(Stri ng value, NumberStyles options,
NumberFormatInf o numfmt)
at System.UInt16.P arse(String s, NumberStyles style, NumberFormatInf o
info)
at System.UInt16.P arse(String s)
at ApplicationFram e.SubsystemBrow serControl.GetS electedRows(Dat aGrid
dg) in D:\C-5 RERP\PVCS
7-26-06\PCIU_CSCI\Us erInterfaceComp onents\Subsyste mBrowserControl .cs:line 1290
at
ApplicationFram e.SubsystemBrow serControl.addT PmenuItem_Click (Object sender,
EventArgs e) in D:\C-5 RERP\PVCS
7-26-06\PCIU_CSCI\Us erInterfaceComp onents\Subsyste mBrowserControl .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
Jul 27 '06 #1
8 2107
WhiteWizard <Wh*********@di scussions.micro soft.comwrote:
Have we got a STRANGE one going here.
I have difficulty understanding what your problem is. You're calling
ushort.Parse() with a string, and it isn't a valid string, right? So
panels / viewing areas and related discussion etc. is irrelevant, right?

What exactly is the problem?
at System.UInt16.P arse(String s)
at ApplicationFram e.SubsystemBrow serControl.GetS electedRows(Dat aGrid
dg) in D:\C-5 RERP\PVCS
The code that's calling Parse is under your control - surely you can
isolate the value that's being passed to ushort.Parse()?

-- Barry

--
http://barrkel.blogspot.com/
Jul 27 '06 #2
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 NumberFormatInf o benig used.
--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"WhiteWizar d" <Wh*********@di scussions.micro soft.comwrote in message
news:9A******** *************** ***********@mic rosoft.com...
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(st rSysID). On the problem machines this generates
the
following build error:

A first chance exception of type 'System.FormatE xception' occurred in
mscorlib.dll
TestPointSpec: Error TP 774 not a number 0 System.FormatEx ception: Input
string was not in a correct format.
at System.Number.S tringToNumber(S tring str, NumberStyles options,
NumberBuffer& number, NumberFormatInf o info, Boolean parseDecimal)
at System.Number.P arseUInt32(Stri ng value, NumberStyles options,
NumberFormatInf o numfmt)
at System.UInt16.P arse(String s, NumberStyles style, NumberFormatInf o
info)
at System.UInt16.P arse(String s)
at ConfigurationFi les.TestPointSp ecificationFile .ParseEnumerati on(UInt16
specID, String wholeEnum) in D:\C-5 RERP\PVCS
7-26-06\Common\Confi gurationFiles\T estPointSpecifi cationFile.cs:l ine 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.FormatEx ception was unhandled
Message="Input string was not in a correct format."
Source="mscorli b"
StackTrace:
at System.Number.S tringToNumber(S tring str, NumberStyles options,
NumberBuffer& number, NumberFormatInf o info, Boolean parseDecimal)
at System.Number.P arseUInt32(Stri ng value, NumberStyles options,
NumberFormatInf o numfmt)
at System.UInt16.P arse(String s, NumberStyles style,
NumberFormatInf o
info)
at System.UInt16.P arse(String s)
at ApplicationFram e.SubsystemBrow serControl.GetS electedRows(Dat aGrid
dg) in D:\C-5 RERP\PVCS
7-26-06\PCIU_CSCI\Us erInterfaceComp onents\Subsyste mBrowserControl .cs:line
1290
at
ApplicationFram e.SubsystemBrow serControl.addT PmenuItem_Click (Object
sender,
EventArgs e) in D:\C-5 RERP\PVCS
7-26-06\PCIU_CSCI\Us erInterfaceComp onents\Subsyste mBrowserControl .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

Jul 27 '06 #3
Ok, so I obviously didn't get the message out ;) I HATE it when that happens!

The problem is that WHENEVER we have a string with a value of "0", we have a
problem. The errors we just examples of some of the problems. And it
appears that it ONLY happens when the value of the string is "0".

We did check the versions of the framework we are using, but have NOT
checked the NumberFormatInf o as suggested, so I'll do that today.

Thanks for the responses!

WhiteWizard
aka Gandalf
MCSD.NET, MCAD, MCT
"Barry Kelly" wrote:
WhiteWizard <Wh*********@di scussions.micro soft.comwrote:
Have we got a STRANGE one going here.

I have difficulty understanding what your problem is. You're calling
ushort.Parse() with a string, and it isn't a valid string, right? So
panels / viewing areas and related discussion etc. is irrelevant, right?

What exactly is the problem?
at System.UInt16.P arse(String s)
at ApplicationFram e.SubsystemBrow serControl.GetS electedRows(Dat aGrid
dg) in D:\C-5 RERP\PVCS

The code that's calling Parse is under your control - surely you can
isolate the value that's being passed to ushort.Parse()?

-- Barry

--
http://barrkel.blogspot.com/
Jul 27 '06 #4
I have good news and bad news.

The good news is that with Ignacio's suggestion we checked the
NumberFormatInf o 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 NumberFormatInf o benig used.
--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"WhiteWizar d" <Wh*********@di scussions.micro soft.comwrote in message
news:9A******** *************** ***********@mic rosoft.com...
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(st rSysID). On the problem machines this generates
the
following build error:

A first chance exception of type 'System.FormatE xception' occurred in
mscorlib.dll
TestPointSpec: Error TP 774 not a number 0 System.FormatEx ception: Input
string was not in a correct format.
at System.Number.S tringToNumber(S tring str, NumberStyles options,
NumberBuffer& number, NumberFormatInf o info, Boolean parseDecimal)
at System.Number.P arseUInt32(Stri ng value, NumberStyles options,
NumberFormatInf o numfmt)
at System.UInt16.P arse(String s, NumberStyles style, NumberFormatInf o
info)
at System.UInt16.P arse(String s)
at ConfigurationFi les.TestPointSp ecificationFile .ParseEnumerati on(UInt16
specID, String wholeEnum) in D:\C-5 RERP\PVCS
7-26-06\Common\Confi gurationFiles\T estPointSpecifi cationFile.cs:l ine 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.FormatEx ception was unhandled
Message="Input string was not in a correct format."
Source="mscorli b"
StackTrace:
at System.Number.S tringToNumber(S tring str, NumberStyles options,
NumberBuffer& number, NumberFormatInf o info, Boolean parseDecimal)
at System.Number.P arseUInt32(Stri ng value, NumberStyles options,
NumberFormatInf o numfmt)
at System.UInt16.P arse(String s, NumberStyles style,
NumberFormatInf o
info)
at System.UInt16.P arse(String s)
at ApplicationFram e.SubsystemBrow serControl.GetS electedRows(Dat aGrid
dg) in D:\C-5 RERP\PVCS
7-26-06\PCIU_CSCI\Us erInterfaceComp onents\Subsyste mBrowserControl .cs:line
1290
at
ApplicationFram e.SubsystemBrow serControl.addT PmenuItem_Click (Object
sender,
EventArgs e) in D:\C-5 RERP\PVCS
7-26-06\PCIU_CSCI\Us erInterfaceComp onents\Subsyste mBrowserControl .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


Jul 27 '06 #5
Hi,
One of the Parse variants takes a NumberFormatInf o you can use it. The weird
thing is that you say that you get error not when you have a '+' in front
but when you have a 0 , so +1 is ok, , but 01 which is kind of weird.

why don't you try with this version and use InvariantCultur e as the
parameter.
--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"WhiteWizar d" <Wh*********@di scussions.micro soft.comwrote in message
news:73******** *************** ***********@mic rosoft.com...
>I have good news and bad news.

The good news is that with Ignacio's suggestion we checked the
NumberFormatInf o 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 NumberFormatInf o benig used.
--
--
Ignacio Machin,
ignacio.mach in AT dot.state.fl.us
Florida Department Of Transportation

"WhiteWizard " <Wh*********@di scussions.micro soft.comwrote in message
news:9A******* *************** ************@mi crosoft.com...
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(st rSysID). On the problem machines this
generates
the
following build error:

A first chance exception of type 'System.FormatE xception' occurred in
mscorlib.dll
TestPointSpec: Error TP 774 not a number 0 System.FormatEx ception:
Input
string was not in a correct format.
at System.Number.S tringToNumber(S tring str, NumberStyles options,
NumberBuffer& number, NumberFormatInf o info, Boolean parseDecimal)
at System.Number.P arseUInt32(Stri ng value, NumberStyles options,
NumberFormatInf o numfmt)
at System.UInt16.P arse(String s, NumberStyles style, NumberFormatInf o
info)
at System.UInt16.P arse(String s)
at
ConfigurationFi les.TestPointSp ecificationFile .ParseEnumerati on(UInt16
specID, String wholeEnum) in D:\C-5 RERP\PVCS
7-26-06\Common\Confi gurationFiles\T estPointSpecifi cationFile.cs:l ine
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.FormatEx ception was unhandled
Message="Input string was not in a correct format."
Source="mscorli b"
StackTrace:
at System.Number.S tringToNumber(S tring str, NumberStyles options,
NumberBuffer& number, NumberFormatInf o info, Boolean parseDecimal)
at System.Number.P arseUInt32(Stri ng value, NumberStyles options,
NumberFormatInf o numfmt)
at System.UInt16.P arse(String s, NumberStyles style,
NumberFormatInf o
info)
at System.UInt16.P arse(String s)
at
ApplicationFram e.SubsystemBrow serControl.GetS electedRows(Dat aGrid
dg) in D:\C-5 RERP\PVCS
7-26-06\PCIU_CSCI\Us erInterfaceComp onents\Subsyste mBrowserControl .cs:line
1290
at
ApplicationFram e.SubsystemBrow serControl.addT PmenuItem_Click (Object
sender,
EventArgs e) in D:\C-5 RERP\PVCS
7-26-06\PCIU_CSCI\Us erInterfaceComp onents\Subsyste mBrowserControl .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



Jul 27 '06 #6
You should be able to change them in the registry at
HKEY_CURRENT_US ER\Control Panel\Internati onal
or
HKEY_USERS\.DEF AULT\Control Panel\Internati onal

The value your looking for is sPositiveSign. It is set to an empty string on
my machine

/claes

"WhiteWizar d" <Wh*********@di scussions.micro soft.comwrote in message
news:73******** *************** ***********@mic rosoft.com...
>I have good news and bad news.

The good news is that with Ignacio's suggestion we checked the
NumberFormatInf o 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 NumberFormatInf o benig used.
--
--
Ignacio Machin,
ignacio.mach in AT dot.state.fl.us
Florida Department Of Transportation

"WhiteWizard " <Wh*********@di scussions.micro soft.comwrote in message
news:9A******* *************** ************@mi crosoft.com...
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(st rSysID). On the problem machines this
generates
the
following build error:

A first chance exception of type 'System.FormatE xception' occurred in
mscorlib.dll
TestPointSpec: Error TP 774 not a number 0 System.FormatEx ception:
Input
string was not in a correct format.
at System.Number.S tringToNumber(S tring str, NumberStyles options,
NumberBuffer& number, NumberFormatInf o info, Boolean parseDecimal)
at System.Number.P arseUInt32(Stri ng value, NumberStyles options,
NumberFormatInf o numfmt)
at System.UInt16.P arse(String s, NumberStyles style, NumberFormatInf o
info)
at System.UInt16.P arse(String s)
at
ConfigurationFi les.TestPointSp ecificationFile .ParseEnumerati on(UInt16
specID, String wholeEnum) in D:\C-5 RERP\PVCS
7-26-06\Common\Confi gurationFiles\T estPointSpecifi cationFile.cs:l ine
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.FormatEx ception was unhandled
Message="Input string was not in a correct format."
Source="mscorli b"
StackTrace:
at System.Number.S tringToNumber(S tring str, NumberStyles options,
NumberBuffer& number, NumberFormatInf o info, Boolean parseDecimal)
at System.Number.P arseUInt32(Stri ng value, NumberStyles options,
NumberFormatInf o numfmt)
at System.UInt16.P arse(String s, NumberStyles style,
NumberFormatInf o
info)
at System.UInt16.P arse(String s)
at
ApplicationFram e.SubsystemBrow serControl.GetS electedRows(Dat aGrid
dg) in D:\C-5 RERP\PVCS
7-26-06\PCIU_CSCI\Us erInterfaceComp onents\Subsyste mBrowserControl .cs:line
1290
at
ApplicationFram e.SubsystemBrow serControl.addT PmenuItem_Click (Object
sender,
EventArgs e) in D:\C-5 RERP\PVCS
7-26-06\PCIU_CSCI\Us erInterfaceComp onents\Subsyste mBrowserControl .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



Jul 28 '06 #7
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_US ER\Control Panel\Internati onal
or
HKEY_USERS\.DEF AULT\Control Panel\Internati onal

The value your looking for is sPositiveSign. It is set to an empty string on
my machine

/claes

"WhiteWizar d" <Wh*********@di scussions.micro soft.comwrote in message
news:73******** *************** ***********@mic rosoft.com...
I have good news and bad news.

The good news is that with Ignacio's suggestion we checked the
NumberFormatInf o 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 NumberFormatInf o benig used.
--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"WhiteWizar d" <Wh*********@di scussions.micro soft.comwrote in message
news:9A******** *************** ***********@mic rosoft.com...
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(st rSysID). On the problem machines this
generates
the
following build error:

A first chance exception of type 'System.FormatE xception' occurred in
mscorlib.dll
TestPointSpec: Error TP 774 not a number 0 System.FormatEx ception:
Input
string was not in a correct format.
at System.Number.S tringToNumber(S tring str, NumberStyles options,
NumberBuffer& number, NumberFormatInf o info, Boolean parseDecimal)
at System.Number.P arseUInt32(Stri ng value, NumberStyles options,
NumberFormatInf o numfmt)
at System.UInt16.P arse(String s, NumberStyles style, NumberFormatInf o
info)
at System.UInt16.P arse(String s)
at
ConfigurationFi les.TestPointSp ecificationFile .ParseEnumerati on(UInt16
specID, String wholeEnum) in D:\C-5 RERP\PVCS
7-26-06\Common\Confi gurationFiles\T estPointSpecifi cationFile.cs:l ine
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.FormatEx ception was unhandled
Message="Input string was not in a correct format."
Source="mscorli b"
StackTrace:
at System.Number.S tringToNumber(S tring str, NumberStyles options,
NumberBuffer& number, NumberFormatInf o info, Boolean parseDecimal)
at System.Number.P arseUInt32(Stri ng value, NumberStyles options,
NumberFormatInf o numfmt)
at System.UInt16.P arse(String s, NumberStyles style,
NumberFormatInf o
info)
at System.UInt16.P arse(String s)
at
ApplicationFram e.SubsystemBrow serControl.GetS electedRows(Dat aGrid
dg) in D:\C-5 RERP\PVCS
7-26-06\PCIU_CSCI\Us erInterfaceComp onents\Subsyste mBrowserControl .cs:line
1290
at
ApplicationFram e.SubsystemBrow serControl.addT PmenuItem_Click (Object
sender,
EventArgs e) in D:\C-5 RERP\PVCS
7-26-06\PCIU_CSCI\Us erInterfaceComp onents\Subsyste mBrowserControl .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


Jul 31 '06 #8
did you ever solve this issue?
I am have the same problem. Can not insert a 0 (zero) into the datagridview.
Aug 7 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
12556
by: Nobody | last post by:
I have some code that I am trying to optimize for speed... trying to squeeze every last CPU cycle out... I remembered an old trick where dividing & multiplying can be sped up by using bitshifts and addition / subtraction instead (doing this saved me about 11% time on my 2.26ghz P4). Really easy with powers of two. I implemented this last night when I was tired, and this morning, I realize it was not exactly right (values were slightly...
9
2208
by: Wescotte | last post by:
Here is a small sample program I wrote in PHP to help illustrates problem I'm having. The data base is using DB2 V5R3M0. The client is WinXP machine using the iSeries Client Access Driver ver 10.00.04.00 to connect to the database. The problem is that executing the exact same SQL select statement more than twice int a row stops produces results. The first two instances will always produce the correct results but after that it will simply...
0
2102
by: Gary Carson | last post by:
Can anyone tell why the query below would throw a divide-by-zero error? The only reason I can see for the error happening would be if SUM() came out to be zero, but this never happens with the data I'm using. SOME of the values in the EXP_NET column are zero, but the sum itself is always non-zero. The query is: TRANSFORM SUM(-)/SUM()*100 AS DATA SELECT TBL.EQUIPMENT AS EQUIPMENT,
2
1340
by: Chris | last post by:
Hi, a strange behaviour when working with exceptions : when I divide and integer by 0 will an exception be thrown. OK but, when I divide a double by 0 is no exception thrown ??? How come ? Try it out.
1
1138
by: Chris | last post by:
Hi, a strange behaviour when working with exceptions : when I divide and integer by 0 will an exception be thrown. OK but, when I divide a double by 0 is no exception thrown ??? How come ? Try it out.
8
2658
by: Kevin | last post by:
Dim X as int32 Dim Y as int64 X = Y / 1024 gives me the error: "Operator is not valid for type 'UInt64' and type 'Integer'." I'm new to VB.NET and this is one of the reasons why I've resisted so long. I've tried Dimming X as Int64 and integer. What do I have to
0
1476
by: Wescotte | last post by:
<?php global $TABLE_GL_DATA; global $connect; $PREPARED_SQL = odbc_prepare($connect, "INSERT INTO $TABLE_GL_DATA VALUES (?,?,?,?,?,?,?)"); function Generate_GL_Data() {
8
4812
by: =?Utf-8?B?bWljaGFlbGd3ZWllcg==?= | last post by:
Hello! I was working on some code the other day, and I came across an odd discrepancy between the decimal and the double type. If I attempt to divide a decimal by zero, the framework throws an error. If I attempt to divide a double by zero, the framework returns infinity. From a mathematical standpoint, it would seem to me that the decimal handles this division correctly, while the double's handling of this is flawed. Is there a...
19
1759
by: david | last post by:
I took old code and decided to modify it a bit, and I just noticed that it does not compile at all and before server one of severs (main) crashed in the system it was working fine (I am really sure that I remember that). Now I am getting this error: $ make g++ -Wall -ansi -pedantic -c pirma_lib.cpp g++ -Wall -ansi -pedantic -c pirma.cpp In file included from pirma.cpp:2:
0
9680
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9528
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10455
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10173
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9052
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7547
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5441
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3731
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2925
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.