Showing posts with label Working. Show all posts
Showing posts with label Working. Show all posts

Unicode Collation Error

If you have such an error when you are trying to execute any SQL command:

CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 10007 Unicode data in a Unicode-only collation or ntext data cannot be sent to clients using DB-Library (such as ISQL) or ODBC version 3.7 or earlier. [10007] (severity 5) [(null)]

There are some solutions for this matter. The first and the simplest is to change any data type from unicode type (nvarchar, ntext, nchar) to non-Unicode support type such as varchar, char, text. The next solution is to install the most update ODBC. And the last solution is using casting like the following :

SELECT CAST(field1 AS TEXT) AS field1 FROM table

It took me half days to find the solution for such simple problem. Wish this helps you.

Labels: , ,

Quotes of the Day

Recent Comments

Followers

Shev's bookshelf: read

OutliersKetika Cinta Bertasbih5 cmLaskar PelangiSang PemimpiEdensor

More of Shev's books »
Shev Save's  book recommendations, reviews, favorite quotes, book clubs, book trivia, book lists