How to import a flat file without changing regional settings on the deployment server?

烂漫一生 提交于 2020-02-15 07:40:40

问题


I am trying to read a text file in SSIS (2005/2008). I created a connection to the file and placed flat file source, and it works fine in preview but when I try to run I get error saying:

[Derived Column [91848]] 
Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR

So I have identified that there are couple of columns with decimal numbers which use period as delimiters. But since I work in Scandinavian environment, the servers expect comma as delimiters.

What works is manually changing delimiter from comma to period in regional settings on the windows server but this is not an adequate solution.

How do I import the flat file using SSIS without having to change the regional settings on the server where the package is deployed?


回答1:


You should be able to set the LocaleID on the Flat File connection object. That will apply the English locale settings when reading that file without affecting the other things on your computer. (Look in the Properties window, not the Editor dialog.)

Right-click on the flat file connection under Connection Managers section and select Properties. You can also select the flat file connection manager and press F4 to view the properties.

Set the LocaleID according to your preference.



来源:https://stackoverflow.com/questions/14647532/how-to-import-a-flat-file-without-changing-regional-settings-on-the-deployment-s

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!