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: 
Can you get the last column seperately using:

```
SELECT SUBSTRING (longfield,1,200) as Part1, SUBSTRING (longfield,201,200) as Part2, SUBSTRING (longfield,401,200) as Part3, SUBSTRING (longfield,601,200) as Part4

```

?

You can then glue the columns back together. You might need some special cases for when then string isn't actualy that long.
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)