Page 1 of 1

MSSQL "for xml" limit

Posted: Thu Oct 04, 2007 9:55 am
by alexey_r
The problem is: when I use mssql query "select ID,Name from Table for xml raw", it returned only 2033-2048 bytes (4K div 2). How it can be solved?
For about, this problem doesn't exists, when I try this query from ASP.NET projects.
I use freeTDS for select Unicode data.
Editing php.ini and increasing mssql.textsize and mssql.textlimit not solved this problem.
Editing freetds.conf and increasing text size not solved this problem.
Anyone knows how it can be solved?
Thanks.

Posted: Thu Oct 04, 2007 9:58 am
by feyd
Post your code, please.

Posted: Fri Oct 05, 2007 2:31 am
by alexey_r
Code is just simple:

Code: Select all

<?php
        $sqllink = mssql_connect('.', 'sa', '') or die('General fault. Could not connect to database');
        mssql_select_db('Flowers');
        $result = mssql_query('select Farm_id,Name from Farm for xml raw', $sqllink);
        $data = mssql_fetch_row($result);
        echo htmlspecialchars($data[0]);
?>