This statement (txtNewOdometer is a variable for an edit box):

lSN = System.Convert.ToInt64(txtNewOdometer.Text);

is causing an exception iff a zero ('0') is entered into the textbox. But
only on one user's computer; works fine on everyone elses.

The exception's Message is "Input string was not in a correct format."

Does anyone have any idea whatsoever on what could be happening, or what
further steps I can take to analyze this problem?

Any help greatly appreciated!

Re: System.Convert.ToInt64(String) method exception by VJ

VJ
Fri Mar 23 11:54:08 CDT 2007

you have a stack Trace of the exception?

VJ

"David Lowe" <DavidLowe@discussions.microsoft.com> wrote in message
news:CC90BC2F-571A-4458-8BDD-E7C7B595B9D1@microsoft.com...
> This statement (txtNewOdometer is a variable for an edit box):
>
> lSN = System.Convert.ToInt64(txtNewOdometer.Text);
>
> is causing an exception iff a zero ('0') is entered into the textbox. But
> only on one user's computer; works fine on everyone elses.
>
> The exception's Message is "Input string was not in a correct format."
>
> Does anyone have any idea whatsoever on what could be happening, or what
> further steps I can take to analyze this problem?
>
> Any help greatly appreciated!



Re: System.Convert.ToInt64(String) method exception by PS

PS
Sun Mar 25 18:43:45 CDT 2007


"David Lowe" <DavidLowe@discussions.microsoft.com> wrote in message
news:CC90BC2F-571A-4458-8BDD-E7C7B595B9D1@microsoft.com...
> This statement (txtNewOdometer is a variable for an edit box):
>
> lSN = System.Convert.ToInt64(txtNewOdometer.Text);

Use the TryParse method on Int64.

PS

>
> is causing an exception iff a zero ('0') is entered into the textbox. But
> only on one user's computer; works fine on everyone elses.
>
> The exception's Message is "Input string was not in a correct format."
>
> Does anyone have any idea whatsoever on what could be happening, or what
> further steps I can take to analyze this problem?
>
> Any help greatly appreciated!