Flat File Source Unicode Issues SSIS 2005
I have a situation where I want to use unicode for all of my text output. I have created a unicode text file and a Flat File Connection Manager which properly shows the 'Unicode' checkbox. I then create a Flat File Source and I get the following message from the advanced editor of the Flat File Source: Error at <component_name>: The data type for "output column "Flat File SourceError Output Column" (26)" is DT_TEXT, which is not supported with Unicode files. Use DT_NTEXT instead and convert the data to DT_TEXT using the data conversion component. I go over the the Input and Output Properties tab of the advanced editor and try to change the Flat file source error output column from Code Page 1252, DT_TEXT to DT_NTEXT only to get an error telling me I cannot change that property. How am I to support unicode files in a source, when the source object itself has an output function that does not accept unicode? The reason for the whole unicode decision is we are using codepage 1252 and I get this error when I try to run it in production: Description: Data conversion failed. The data conversion for column "Column 0" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".
October 18th, 2008 1:29am

sqlrunner wrote: I go over the the Input and Output Properties tab of the advanced editor and try to change the Flat file source error output column from Code Page 1252, DT_TEXT to DT_NTEXT only to get an error telling me I cannot change that property. How am I to support unicode files in a source, when the source object itself has an output function that does not accept unicode? Hi, Why one cannot ever change the datatype of an error output column is really puzzling me. I even got messages from Microsoft tech support telling me to do so while it in fact impossible. You can do this for external and output columns but NOT for error columns. I think it is a bug. Usually, when confronted to such issue, whatI do is to delete the connection and source. make sure my source file really has the correct type, then go to the Data Flow, create a new source, create the new connection from within the new sourcethen most of the time, It works. I can use conversion if i need to and I can create a destination with whatever type I need. Try this and if this does not work, please post somewhere an example of the source text file so we can investigate. i.e. is it UTF-8?
Free Windows Admin Tool Kit Click here and download it now
October 18th, 2008 9:52pm

I found the issues. The answer to not being able to change the output column. For whatever reason, when you create a File Output Source and map the columns, it sets the output property based upon the type of file. If it is unicode, it sets the error output column to DT_NTEXT, otherwise it sets it to DT_TEXT. You are correct, Philippe,you must delete the object and recreate it already attached to a new unicode file. Morale of that story, create the flatfile output source on an existing file in the encoding you want, you cannot change it. The second part, the truncation error, was due to a mismatch on my part. The Flat file source set the column in question to char(50) and that worked fine in dev/test, but turns out in production the input was much larger (on the order of 90+) so the truncation error occured.
October 19th, 2008 6:52am

I am assuining you resolved your issue, and I maked your last post as an answer. Please always mark the post that answer your threads, even is it your own, that would help others with similar issues searching the forum.
Free Windows Admin Tool Kit Click here and download it now
October 19th, 2008 2:54pm

I am assuining you resolved your issue, and I maked your last post as an answer. Please always mark the post that answer your threads, even is it your own, that would help others with similar issues searching the forum. I am having the same issue. I have a Business Object output saved as .txt file. For some reasons, from one time to another, when saving the .txt file, the code page seems to have changed. I had a loading package that work fine. Now I see it is complaining the same errors as in this thread. Do I have to do anything to specify the code page when I save the BO output to the .txt file? I am puzzled here still learning more about code page.Sincerely Thank You !
February 24th, 2011 2:19pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics