You cannot use DB-Library (such as ISQL) or ODBC 3.7 or earlier versions to import ntext data.
Warning: mssql_query () [function. mssql-query]: message: ntext data or Unicode data that uses only Unicode sorting rules cannot be sent to the client using DB-Library (such as ISQL), ODBC 3.7, or earlier versions. (Severity 16) in D: PHPnowhtdocss export dedb_mssql.class.php on line 55
The code is as follows: |
Copy code |
Warning: mssql_query () [function. mssql-query]: Query failed in D: phpnowhtdocss?dedb_mssql.class.php on line 55 MsSQL Query: SELECT * FROM PE_Config MsSQL Error: 1 MsSQL Errno: 1 Message: MsSQL Query Error |
During PB development, because the ntext field is used in the database, the following error message is Prompted. After reading a large amount of information, I finally understood the problem:
PB error: ntext data or Unicode data only using Unicode sorting rules cannot be sent to the client using DB-Library (such as ISQL) or ODBC 3.7 or earlier.
----------------
In SQL server, ntext and nvarchar fields are stored in unicode encoding. Therefore, php uses mssql extension to read ntext and nvarchar fields with errors.
If the title field type is nvarchar and the content field type is ntext, the following SQL statement reports an error:
The code is as follows: |
Copy code |
Select title, content from article where 1 |
The correct statement is as follows:
The code is as follows: |
Copy code |
Select convert (varchar (255), title) as title, convert (text, content) as content from article where 1 |
Or do not use the ntext field
Ntext data Warning: mssql_query () [function. mssql-query]: message: ntext data or Unicode data that uses only Unicode sorting rules cannot be sent to the client using DB-Library (such as ISQL), ODBC 3.7, or earlier versions. (Severity 16) in D: PHPnowhtdocss export dedb_mssql.class.php on line 55 Warning: mssql_query () [function. mssql-query]: Query failed in D: phpnowhtdocss?dedb_mssql.class.php on line 55 MsSQL Query: SELECT * FROM PE_Config MsSQL Error: 1 MsSQL Errno: 1 Message: MsSQL Query Error in PB development, because the database is used