php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12508 can't return a ntext type field in a select statement
Submitted: 2001-08-01 04:44 UTC Modified: 2002-08-13 23:22 UTC
Votes:3
Avg. Score:4.3 ± 0.9
Reproduced:3 of 3 (100.0%)
Same Version:1 (33.3%)
Same OS:3 (100.0%)
From: php at work-smarter dot co dot uk Assigned:
Status: Closed Package: MSSQL related
PHP Version: 4.0.6 OS: Windows 2000
Private report: No CVE-ID: None
 [2001-08-01 04:44 UTC] php at work-smarter dot co dot uk
selecting a ntext type field using mssql_query produces the following error message

MS SQL message: ntext data cannot be sent to clients using DB-Library (such as ISQL) or ODBC version 3.7 or earlier. (severity 16) 


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-10 07:15 UTC] php at gustl dot net
I found a good work around. Insert following SQL query after connecting to the MSSQL database:

SET TEXTSIZE 100000

or to your estimated max size, which should be the same as defined in odbc_longreadlen (), if MSSQL is accessed through ODBC, which I prefer, because the PHP mssql functions don't return my german umlaute correctly.

hope this helps

gustav graf
 [2002-04-11 01:24 UTC] tsugiiwa at kcej dot konami dot com
I think this could be duplicate of #10114 or caused by same problem.
Actualy Gustav's work around make me free from the error, but the return value was not fetched correctly.
NULL is the always result for all fields.
And, this workaround could be Ok for ODBC function only. Not succeeded at mssql functions.
 [2002-08-13 23:22 UTC] kalowsky@php.net
Unfortunately the ODBC functionality is based off of ODBC v2, which means NTEXT, TEXT, and pretty much any UNICODE is unknown to PHP.  Marking this as closed as there is no way to really fix this, without overhauling the entire ODBC system (which is in progress, but no promises)
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sat Jan 29 14:03:34 2022 UTC