#11923 [Com]: when you access char(2000),i only get 255 bytes data, why ?
| From: | mbretter at jawa dot at | Date: | Wed, 07 Aug 2002 06:49:44 +0000 |
| Subject: | #11923 [Com]: when you access char(2000),i only get 255 bytes data, why ? | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-16113@lists.php.net to get a copy of this message | ||
ID: 11923
Comment by: mbretter@jawa.at
Reported By: chenwumail@163.net
Status: No Feedback
Bug Type: MSSQL related
Operating System: Windows2000
PHP Version: 4.0.5
New Comment:
not a bug in php, a bug in microsoft.
This is a limitation of the db-libraray of mssql.
Try select cast (keyword as text) from news
Previous Comments:
------------------------------------------------------------------------
[2002-07-08 01:00:10] php-bugs@lists.php.net
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
------------------------------------------------------------------------
[2002-06-07 11:02:20] k.schroeder@php.net
Does this working for you?
------------------------------------------------------------------------
[2002-02-07 23:45:02] ollie@cronky.net
Its to with the TDS protocol (used for connecting to MSSQL/Sybase)
apparently. On windows its out of date and therefore doesn't support
more that 255 chars, you can use a convert statement (to convert the
output of the column to text) or just change the datatype to text.
Or use the ODBC functions.
------------------------------------------------------------------------
[2001-07-06 05:19:11] chenwumail@163.net
My SQL Server is SQL Server 2000,
My PHP is PHP 4.05
My OS is windows 2000
My table name is news,defined like:
keyword varchar(2000),
content text
I can save data to keyword but when i get is ,it only 255 bytes, I view
database, data is true save in table.
example:
$result=mssql_query("select keyword from news");
print strlent(mssql_result($result,0,0));
-------
255
------------------------------------------------------------------------
[2001-07-06 05:14:23] chenwumail@163.net
when you access char(2000),i only get 255 bytes data, why ?
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=11923&edit=1