Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Export to Flat File fails DT_NTEXT ansi error

Author  Topic 

kory27
Starting Member

35 Posts

Posted - 2009-03-16 : 18:40:42
I need help.

I am exporting a product table. I am exporting to a txt, tab delimited. I got the following error;


Error 0xc020802e: Data Flow Task: The data type for "input column "ProductLink" (262)" is DT_NTEXT, which is not supported with ANSI files. Use DT_TEXT instead and convert the data to DT_NTEXT using the data conversion component.
(SQL Server Import and Export Wizard)

So, i wrote a query to change the datatype for the productlink field and it was successful and basically it still said the same thing. Could someone please provide me some insight to solve this problem?

You help is greatly appreciated.

sunitabeck
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2009-03-16 : 20:11:04
This happens because the meta data stored in the SSIS or DTS package is not refreshed. When I get frustrated, I just scratch the package and redo it with the correct data types (don't laugh at me, I really do). Here are couple of links that might be of interest: http://followtheheard.blogspot.com/2007/10/ssis-external-metadata-refresh.html
http://mgarner.wordpress.com/2008/04/04/metadata-refresh/
Go to Top of Page

kory27
Starting Member

35 Posts

Posted - 2009-03-17 : 12:41:48
thanks for you input. i fixed it by running an alter statement on the nvarchar fields to set them to text. it was funny b/c even after i ran it, when you went to modify table to view datatype, it still said nvarchar (255), but it worked.

sql is certainly fickle.
Go to Top of Page

frenkatsqlteam
Starting Member

2 Posts

Posted - 2009-10-27 : 11:50:24
can you share that good to convert DT_NTEXT to format so it can be supported to CSV file from sql table. Or steps in SSIS package. Many thanks. I had a hard time to do that.
Go to Top of Page
   

- Advertisement -