Thursday, April 30, 2009

MSSSQL nvarchar support

Does anyone know if CakePHP officially supports nvarchar fields in
MSSQL databases?

I'm using MS SQL Server 2005 with CakePHP 1.2.2.8120 Stable on windows
and get the following errors from Cake when trying to view a page that
contains text from an nvarchar(max) field:

Warning (2): mssql_query() [function.mssql-query]: message: 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. (severity 16) [CORE\cake\libs\model\datasources\dbo
\dbo_mssql.php, line 173]

Warning (2): mssql_query() [function.mssql-query]: Query failed [CORE
\cake\libs\model\datasources\dbo\dbo_mssql.php, line 173]

Warning (512): SQL Error: 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. [CORE\cake\libs\model\datasources
\dbo_source.php, line 525]


I've done some digging around and found this ticket: https://trac.cakephp.org/ticket/4287
Which affects ntext fields with the same error. I've tried the
supplied patch though didn't have any luck.

Any ideas on how I can get this working? Unfortunately I'm stuck using
MS SQL on Windows and really need unicode fields.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: