0

Ran into an issue recently - We encounter an exception when we are trying to set a value in our data table. The exception is

System.ArgumentException: Input string was not in a correct format.Couldn't store <42.356> in COLUMN_NAME Column. Expected type is Double. ---> System.FormatException: Input string was not in a correct format.

We are using oracle client - dll version is 4.112.2.0. In the database the Column COLUMN_NAME is of type NUMBER(11,6).

We create the data table using oracledataadapter.FillSchema method. My initial understanding was that the data column will have the data type of System.Decimal. However the data column is created as System.Double - hence the exception. The even stranger issue is that this exception is not reported in our dev database, QA database or integration env but only in one specific client database.

Is the data column being created as double correct? *What else could i be looking at?*

Siddharth Kumar
  • 309
  • 4
  • 17

1 Answers1

0

Is the client in question in a country where the decimal separator is a comma, e.g. Germany where it should be 42,356? It looks like you might have hit a culture issue when converting a string to a double without specifying an explicit format.

David M
  • 71,481
  • 13
  • 158
  • 186