Click here to Skip to main content
15,890,609 members
Please Sign up or sign in to vote.
5.00/5 (1 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

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.

:)

 
Share this answer
 
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.

 
Share this answer
 


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900