Tags: , | Categories: Code Posted by hadleyhope on 5/17/2011 10:05 AM | Comments (1)

If you get this error importing CSV files using the Microsoft OLE DB .NET Framework Data Providers (ADO.NET) it is probably caused by the regional settings on the computer specifying a different decimal and/or digit grouping symbol from that used in numeric values contained in the CSV file being imported.

clip_image001

For example with regional settings set to Italian, which defines the decimal symbol as a comma and the import files containing numeric values with a full stop and as the decimal symbol processing of the file will fail with the error:  “Text file specification field separator matches decimal separator or text delimiter”.

The fix is to add the following options into the schema.ini file that must be in the same directory as the file being imported:

CharacterSet=ANSI

CurrencyThousandSymbol=,

DecimalSymbol=.

blog comments powered by Disqus