MSSQL "for xml" limit

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
alexey_r
Forum Newbie
Posts: 4
Joined: Thu Oct 04, 2007 5:27 am
Location: Moskow, Russia

MSSQL "for xml" limit

Post 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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Post your code, please.
alexey_r
Forum Newbie
Posts: 4
Joined: Thu Oct 04, 2007 5:27 am
Location: Moskow, Russia

Post 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]);
?>
Post Reply