Question: I'm maintaining a web application written in PHP that connects to a MSSQL database.  

The original developer used <http://adodb.sourceforge.net/> as his database library.

The problem is, when reading data using the `GetAll` method, all the strings are truncated to 255 chars. 

Has anyone a solution to my problem?

edit: The column I am having a problem with is a `varchar(800)`

Answer: 
What exactly are you able to change?

I stumbled across this article, which may help: [ADODB Varchar Limit Problem](http://www.sitepoint.com/forums/showthread.php?t=506868)

What it seems to suggest you try is:

1. Change your column type from `varchar` to `text`
2. In the select statement, stipulate a `CAST` for the column:

i.e.:

```
select CAST(MyColumn as text) as MyColumn  

```

The post cites the following two articles, which back up the above

<http://php.oregonstate.edu/manual/en/ref.mssql.php#47527>

<http://php.oregonstate.edu/manual/en/ref.mssql.php#71602>

Hope this helps
Check your whether you are using DISTINCT and GROUP BY statements, apparently "truncation occurs on text fields when using DISTINCT and GROUP BY statements because of the overhead of comparing variable length strings as opposed to fixed length strings".

[Link](http://bytes.com/topic/php/answers/717087-text-truncated-255-chars-odbc)