Skip to main content

Error converting data type nvarchar to numeric Error 42000 when exporting using Database Export Connector


QAID # 18698 Published

Question / Problem:

I receive the following error message in the Database Export Connector:

Error: Script #1 (Database Export Connector) [5 ERROR [42000] [Microsoft][ODBC SQL
Server Driver][SQL Server] Error converting data type nvarchar to numeric.]

How can I resolve this issue?

Answer / Solution:

The solution is to uncheck the Support Locale Format option for the Numeric Field Type that’s being exported.

The issue is that one of the Field Types being exported to the database is decimal type, and by default, the Support Locale Format option is checked (enabled).

The locale format for the Windows PC is set to enter an exponential expression after the decimal point: For example, during Validation, the value is entered as .04.

The Field Type is saved as 4.e-002 because of the Windows locale setting.

The Database Export connector will send the value as 4.e-002 instead of .04, causing the error.

Applies to: 

Product Version

Keywords: locked, XML, type, authentication, configuration, Index, Nvarchar, numeric