.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

cannot convert between unicode and non-unicode

Posted By:      Posted Date: September 22, 2010    Points: 0   Category :Sql Server

I keep getting the error message below when attempting to import a text file (flat file) to an SQL Server Destination using SSIS. This database has recently been migrated from SQL Server 2000 (where I used a DTS Package that worked fine). I plan on doing further manipulation to the file after importing but have so far tried to keep one step at a time. I have tried using a smaller files and different tables but still get a similar response. I believe that the encoding of the text file is ANSI. If it is relevant the database collation is Latin1_General_CI_AS (the same as it was when 2000). Any help anyone can provide will be greatly appreciated!!!

TITLE: Package Validation Error

Package Validation Error


Error at Data Flow Task [SQL Server Destination [174]]: Columns "Column 0" and "AccountNumber" cannot convert between unicode and non-unicode string data types.

Error at Data Flow Task [SQL Server Destination [174]]: The column "Column 1" can't be inserted because the conversion between types DT_STR and DT_I4 is not supported.

Error at Data Flow Task [SQL Server Destination [174]]: The column "Column 2" can't be inserted because the

View Complete Post

More Related Resource Links

Convert Database ANSI To UNICODE

Hi Friends, I Have DB in 2008 And Now i want That table to convert To SQL 2000. So Can anybody tel how we can convert Data from ANSI to UNICODE and vice a versa. Thanks . 

Column Name - cannot convert between unicode & nonunicode string data types



Im using the OLEDB Source to connect the source columns. But its throwing an error msg Column Name - cannot convert between unicode & nonunicode string data types. Could you please provide me the oracle code so that I can use with the select statement. For some of the schemas I have chaged the data types using the derived column before the OLEDB destination.

Actually, one of my team member suggested me to use the Oracle char(2) in the select statement. Can any one help me with the code so that I can use it for the rest of the columns.

Eg source(External Column) - CreatedBYID - DT_wstr(18)

Source - Output cloumn - CreatedById - DTStr(18)



can not convert between unicode and non unicode string data types


Hi All, i am simply transferring data from excel to sql and i have data conversion task in middle with string data type set to all fields but still its giving me the error : can not convert between unicode and non unicode string data types

Any idea?

OLE DB Source & Destination -cannot convert between unicode and non-unicode string data types


Requesting all  for a solution for this problem.

My Package Components:

  1. OLE DB SOURCE - Connected to Oracle 11g server using Oracle Provider for OLEDB.
  4. OLE DB DESTINATION - Connected to SQL server 2008 R2 -Windows 2008R2 64 bit.
Oracle Source Table:

  [MST_ID] NUMBER(2340089,1) NOT NULL,
  [USER_ID] [varchar2](40) NULL,
  [INS_DT] date NULL,
  [SAVED_FLG_TYPE] [varchar2](20) NULL

SQL Server DestinationTable:

  [MST_ID] [int] IDENTITY(2340089,1) NOT NULL,
  [USER_ID] [varchar](40) NULL,
  [TMP_XML] [varchar](max) NULL,
  [TMP_EDT_FLG] [int] NULL,
  [INS_DT] [datetime2](7) NULL,
  [PAT_ID] [int] NULL,
  [SAVED_FLG_TYPE] [varchar](20) NULL

Error: cannot convert between unicode and non-unicode string data types


cannot convert a text to unicode




How to save Unicode in SQL Server 2005

I am using google transliteration to display the text in Hindi/Tamil

I tried to store the text appear as Hindi from textarea in an nvarchar
field of database (SQL Server 2005) , the text saved as "???????".

After retireving text from the same it display the text as "???????".

Can anyone help me how to store and retrieve the actual data from SQL
Server 2005?

I am using ASP.net,VB.Net and SQL Server 2005

Worldly Windows: Extend The Global Reach Of Your Applications With Unicode 5.0


When using global applications, people want to communicate with others on their terms, in their own languages. Unicode 5.0 brings that ideal closer to reality.

Julie D. Allen, Michael S. Kaplan, Cathy Wissink

MSDN Magazine January 2007

MSLU: Develop Unicode Applications for Windows 9x Platforms with the Microsoft Layer for Unicode


The Microsoft Layer for Unicode (MSLU) provides Unicode support on Windows platforms that don't provide their own support, including Windows 98, Windows 95, and Windows Me. With MSLU you can write Unicode applications easily for these platforms. MSLU is simple to install, small (even though it wraps more than 400 APIs), and easy on system resources. This article explains the design criteria behind MSLU and how to put the layer to work for you.

Michael Kaplan and Cathy Wissink

MSDN Magazine October 2001

How do I set a string in a textbox to unicode?

I have a report requirement to embed the fonts when the report is exported to PDF. The report server is  SSRS 2005 SP3 and upgrading to SSRS2008 is not an option. I have validated that all requirements have been met to ensure embedding have been met except one -  "The characters in the string that has the Font property set are Unicode, not ANSI. No font embedding occurs for ANSI characters." I referenced this article for requirements -  http://technet.microsoft.com/en-us/library/ms159713.aspx . My data is in a dataset field that was populated by a stored procedure. When I examine the rdl the it has a type name of System.String (<rd:TypeName>System.String</rd:TypeName>) How can I ensure that any strings in the report are recognized as unicode? The SSRS PDF renderer must be interpreting the strings as ANSI because that's how they are being rendered in the PDF file preventing embedding. Any assistance would be greatly appreciated!

Problem to use unicode chars in yahoo mail

Hi i have a problem to send email via smtpClient class to yahoo mail. if i send a unicode email from non-Yahoo account to yahoo mail, it works correctly (display unicode chars correctly without any making change), but when i send from yahoo account to yahoo mail, it does not display characters correctly and i should change it's encoding to UTF8. can anybody help me to work-around this problem ? Please see my previous thread in this link. thanks in advancehttp://www.codeproject.com/KB/codegen/DatabaseHelper.aspx

SQL Server Unicode Characters in a column

I have an ETL and it fails because of some Unicode Characters. The unicode characters are getting inserted from somewhere in the application and we are still trying to ascertain the source of the same.But till then I need to run a T-SQL Query and find out the rows( I know the column name ) that are causing this problem, modify the data to the correct format and then run the ETL. Would i need to use a cursor? can anyone please advise? It was a bit urgent thus any help would be great! Thanks Nimish

SSIS 2005 - Send Mail Task - signature appended to email is garbled - unicode problem?

Hi, I'm pretty new to SSIS so go easy on me. I have a Send Mail Task to notify if a file cannot be imported - the mailbody is created on the previous step by a VB.NET script task to include the name of the file and the path it's been archived to. The problem I'm having is that while the body of the email I've created is displaying fine, our company's Exchange server appends a signature to all emails, and this is coming up as undisplayable characters, presumably due to some kind of unicode encoding problem. I've tried casting the email body in an expression to DT_STR (doesn't work as DT_STR "cannot be converted to a supported type" which seems a bit odd but never mind), DT_WSTR (garbled signature), DT_TEXT/DT_NTEXT (strange error on this one - "Attempted to read or write protected memory") none of those ideas worked, and I'm a bit stumped now. Can anyone help? I'm using SSIS 2005 with SP3

Unicode in XML

Hi, I'm making a C# application and I want it to support multiple languages. I'm storing the strings in XML files. I tried loading the strings from the XML file but an exception is raised when it encounters a special character like 'ã', it says 'Invalid character in the given encoding. Line 2, position 29'. How do I make unicode available in my XML files?

A reportviewer control bug to display unicode?

  1 Hello everyone, I am using VSTS 2008 + C# + .Net 3.5 + ASP.Net + IIS 7.0 with reportviewer control. The report created by reportviewer control is very simple, just a single line of Chinese characters (I wrote the line of characters statically in a textbox control, no addtional dynamically generating or fetching from database). I upload the error PDF file exported by the report viewer and screen snapshot here, and my most confusion is why the exported PDF file is just 2k bytes size? Is this issue caused by font not embedded in PDF file? Actually I did not find how to embed font in PDF file. Appreciate if anyone could give me some good ideas. This is the error PDF displayed screen snapshot, http://www.4shared.com/photo/gs_KvxSW/characterissue.html This is the error PDF itself, http://www.4shared.com/document/4Fs5rCH_/characterissue.html thanks in advance, George

Unable to translate Unicode character \uD8D6 at index 5 to specified code page.

I' have the error "Unable to translate Unicode character \uD8D6 at index 5 to specified code page." when I call a remote service, using a method that uploads some data (basically data readed from WMI and from Win Registry on the client host) from the client to the server. The server is wsHttpBinding, hosted in IIS7 via an ASP.NET 4.0 Web Site (svc file). The client is an exe, compiled in .NET 3.5 I've tried to set "textEncoding="utf-16"" on the binding, either on server and on client, but still the same. I've no idea about a solution :( Any idea? Thanks  

I don't see unicode data in .vcf file in c# .net

Hi ,   I developed the application in c# that create & write a Vcard file using StreamWriter or BinaryWriter but i open vcf file the name field cannot display the unicode characters correctly..   For example This  "Gabriele Tögl" display as "Gabriele T?gl"   I tried encoding UTF8 & UTF7,UTF32 but it fails.

Unicode characters in ASP.NET application



I need information regarding how to use Unicode characters in ASP.NET in SDK and what are the data types to be used in it. I have come accross this concept for the first time..

All I know id basically we want support for all languages that's why we have opted for Unicode support.


Thnx in advance.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend