RE: [PHP] Microsoft SQL Server varchar(500) field text concatenated at 255 characters.

From: Date: Fri, 28 Mar 2003 12:06:33 +0000
Subject: RE: [PHP] Microsoft SQL Server varchar(500) field text concatenated at 255 characters.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-141424@lists.php.net to get a copy of this message
> Hi There. > > I am using PHP 4.3.0 on WIN32 to query data from a Microsoft SQL Server. > One field I am requesting is type VARCHAR size 500. For some reason, PHP > is returning only the first 255 characters of the text from that field. > > If I change the field type to TEXT, all of the data in that field > is returned. > > Unfortunately, an ASP application is also using that database, > and when I change > the field type to TEXT, it pukes completely. > I would rather try to resolve the issue in PHP than waste my time > looking at ASP code. > > Has anyone got an idea why this might be hapenning? > > Many thanks. > > Scott Hi Scott I believe this is a problem because of the relatively old TDS libraries used by native access methods... Possible workarounds are... . cast the data to TEXT before returning it . use ODBC which doesn't have this problem IIRC HTH Rich

« previous php.general (#141424) next »