Re: Truncated fields

From: Date: Thu, 22 Jan 2004 03:08:25 +0000
Subject: Re: Truncated fields
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-32577@lists.php.net to get a copy of this message
John, I'm getting much more than 255 characters. The field is not varchar but a text field. I've looked into FREETDS as the most likely source of the problem but haven't found anything yet. Michael > Michael Lewis wrote: > > > I'm having a problem with retrieving field data from SQL SERVER 2000 and am > > not sure where the problem lies. I have a variable length field (from 100 - > > 10000 characters). When I retrieve the field using a select statement, then > > into a PHP variable such as $text=$r['body_text'], then the field seems to > > be truncated after a good bit of it has been returned (at least 1000 > > characters). I am using PHP 4.3.4 and FREETDS 0.62 on a Red Hat 9.0 system > > to access SQL Server. The question is, is there a returned field size > > maximum defaulting or defined in SQL Server, PHP, or FREETDS and/or has > > anyone else had this problem? > > Not sure where the problem is exactly (I think it's FREETDS), but you > can only use 255 characters in a variable character column. Newer > versions of FREETDS may solve this, otherwise change your column type. > > -- > ---John Holmes...>

« previous php.db (#32577) next »