BUGFIX Fixed SQL server case where text size limit for varchar and text was too small (probably imposed by FreeTDS) so we need to force a 2GB maximum

BUGFIX MSSQLDatabase::text() should return "varchar(max)" as text is deprecated (see http://msdn.microsoft.com/en-us/library/ms187993.aspx)
This commit is contained in:
Sean Harvey 2009-05-27 00:50:48 +00:00
parent 3abcfaf833
commit 42d70770f0

View File

@ -56,6 +56,7 @@ class MSSQLDatabase extends Database {
// Configure the connection // Configure the connection
$this->query('SET QUOTED_IDENTIFIER ON'); $this->query('SET QUOTED_IDENTIFIER ON');
} }
$this->query('SET TEXTSIZE 2147483647');
} }
/** /**
@ -810,9 +811,9 @@ class MSSQLDatabase extends Database {
*/ */
public function text($values, $asDbValue=false){ public function text($values, $asDbValue=false){
if($asDbValue) if($asDbValue)
return Array('data_type'=>'text'); return Array('data_type'=>'varchar(max)');
else else
return 'text null'; return 'varchar(max) null';
} }
/** /**