Click here to Skip to main content
14,271,663 members
Rate this:
Please Sign up or sign in to vote.
See more:
I created an application in vb.net 2005. It works fine on my machine. I tested several different test machines and all were working fine. As for the client, it's generating an error. My application reads from an excel sheet and imports the values to an oracle database. the error being generated is: "conversion from type string to type double is not valid". Why is it generating on on the client's computer and not mine?
Posted
Rate this:
Please Sign up or sign in to vote.

Solution 1

Hi,

if an app runs fine on one machine and not on the other, it is because there is at least one bug in the app; it could be something was looked over, in your case maybe the system (or Excel itself) was used with different regional settings, resulting in a different character choice for "decimal point" and "group separator" (or "thousands separator").

For apps that need to work together, you have to impose similar working conditions; so either they all should follow a fixed standard, or they all should obey the regional settings, or they all should be configurable and get the same configuration settings.

:)

   
Rate this:
Please Sign up or sign in to vote.

Solution 2

It's most likely a problem with Culture settings. On the two PCs you probably have different characters as decimal separators.

Have a look at CultureInfo[^], it provides an InvariantCulture[^] property that lets you build culture-insensitive apps, as well as several properties which expose the host machine's culture settings.

   



CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100