Also check your freetds.conf file 

[global]
host = 192.x.y.z
port = 1433
client charset = UTF-8
tds version = 8.0       <= need this to accept column names >30; also affects 
certain field limits
text size = 20971520        <= 

 
  Andre

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of 
Jochen Daum
Sent: Thursday, 17 March 2011 10:30
To: [email protected]
Subject: Re: [phpug] Pear DB_Dataobject - column length issue.

Hi,

On 17 March 2011 09:54, Alex Osborn <[email protected]> wrote:
> Hi,
>
> Have been tasked with tidying a few things on a legacy app we have 
> inherited - it is using Pear DB_Dataobject with a MSSQL 2008 database.
>
> One bug to fix was that a certain 'text' type column appears to 
> truncate data after a certain point when reading / displaying. As far 
> as I can tell this limit isn't on the database - if a longer string is 
> saved, this is correctly saved when manually checking the database, 
> but the data is cut when loading the object from the database.
>
if you are using the mssql/TDS driver, then you have to (from memory)

a) extend the limit size for blobs:

; Valid range 0 - 2147483647.  Default = 4096.
mssql.textlimit = 2147483647

; Valid range 0 - 2147483647.  Default = 4096.
mssql.textsize = 2147483647

(for some reason I can't find these settings in php.net, but one of our servers 
is set up like this)

b) cast the column to TEXT

HTH.

--
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected] To unsubscribe, send email to
[email protected]
please consider the environment before you print this email

##########################################################################################

The views expressed in this e-mail and any corresponding attachments do not 
necessarily
reflect those of the Health Research Council of New Zealand. This e-mail 
together with any
accompanying attachments may be confidential and subject to legal privilege. If 
you have
received this message in error, please notify the sender immediately and note 
that you may
not copy, disclose or use the content in any way

Thank You.
##########################################################################################

-- 
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]

Reply via email to