MSSQL 2005 truncated text field

Hi all,

I’ve the latest version of Yii (1.1.10), IIS6, SQL Server 2005 Standard ed., PHP 5.2.5 ISAPI.

The problem is that yii is truncating a textfield (4096 bytes) even if on my PHP.INI and on the initSQLs array I have set TEXTSIZE = 2147483647. If I query the same field using mssql_query() it works… I can’t find where and why Yii is truncating the field…

ISSUE (NewsletterBodyHtml is truncated):




$rs = app()->db->createCommand("SELECT NewsletterBodyHtml FROM Newsletter WHERE NewsletterID = 1");

$x = $rs->queryRow();

echo $x['NewsletterBodyHtml'];



ISSUE (NewsletterBodyHtml is truncated):




$newsletter = $this->loadModel($NewsletterID);

echo $newsletter->NewsletterBodyHtml;



Connection on config/main.php:




'db'=>array(

	'connectionString' => 'mssql:host=XXXXYYYYZZZ;dbname=MYDBNAME',

	'username' => 'MyUSERNAME',

	'password' => 'MyPASSWORD',

	'enableParamLogging' => true,

	'initSQLs' => array(

		"SET TEXTSIZE 2147483647",

		"SET ANSI_NULLS ON",

		"SET ANSI_WARNINGS ON",

		"SET ANSI_PADDING ON",

		"SET QUOTED_IDENTIFIER ON",

		"SET CONCAT_NULL_YIELDS_NULL ON",

	),

),



Thanks for your help!!

Angelo