Skip to Content.
Sympa Menu

freetds - Re: maximum string length

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Brian Bruns <camber AT umcc.ais.org>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: maximum string length
  • Date: Fri, 4 Feb 2000 17:47:17 -0500 (EST)



Maybe we should add this to the faq...second time in as many days that
I've been asked this...:-) The explaination gets a little deeper though,
as many dblib/ctlib programs assume no more than 255 characters can be
returned. (PHP however seems to be ok).

Option #2 is to convert them to 'text' during the select...(that is:
'select convert(text,mynvarcharcol) from atable') this will work under all
version of TDS.

Brian


On Fri, 4 Feb 2000, Geoff Winkless wrote:

> "Michael Suedkamp" <ms AT suedkm.franken.de> writes:
> > sorry if this a FAQ. I recently got TreeTDS to work with PHP and MS SQL
> > Server. My question is: Is there a limitation in the string length a query
> > can return? The field I query is varchar(4000) but PHP returns only the
> > first about 250 characters. It looks a little like 255 ie a Byte.
>
> TDS4.2 (and any less than 7 (?)) defines the max length of a varchar as 255
> characters.
>
> If you want to return longer strings you must use version 7 of tds. Which is
> still in development (although you can try it ;-)
>
> Geoff
>





Archive powered by MHonArc 2.6.24.

Top of Page