Technote Details :: Table fields of type NTEXT do not display right
Issue
I have created a NeXTensio form that retrieves data from a table that contains NTEXT type fields. The data from the NTEXT fields is not displaying correctly in the update part of the Nextensio form. This happens when using a MSSQL database server.
Reason
This happens because the UniCode TEXT type fields must always be the last in the SQL SELECT statement in order to be retrieved correctly. Otherwise, NULL results will be returned instead of the correct data, or error messages.
The affected server models are:
- ASP - when using a DSN connection fields of NTEXT type are not displayed. If using a Custom Connection string that specifies Provider= , there is no problem
- PHP_ADODB - when creating a direct connection to the mSSQL server, you get this error 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. - PHP_ADODB using ODBC_MSSQL is not affected by this problem
- ColdFusion - is not affected by this problem
Solution
There is no solution for this problem yet.
To avoid this problem:
- If using ASP as server model, use a Custom Connection String. You must specify the provider, as in the example below:
"Provider=sqloledb;Data Source=[YOUR SQL SERVER];Initial Catalog=[YOUR DATABASE];User Id=[USER ID];Password=[YOUR PASSWORD]" - If using PHP_ADODB use the ODBC_MSSQL library.