DataObject, querying string bigger than 255 chars

From: Date: Mon, 07 Feb 2005 10:46:59 +0000
Subject: DataObject, querying string bigger than 255 chars
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-17417@lists.php.net to get a copy of this message
I'm using DB_DataObject (ver 1.7.2), with M$ SQL Server 2000. I'm having problems querying a string column bigger than 255 chars. The column is of varchar type and 1024 chars in size. However when I query a row, I only get the first 255 chars of the column. Updating seems to work ok though, it can save strings bigger than 255 chars. When I autogen the DataObject class looks like this:- (I've snipped out all but two column). class DataObjects_SongEvaluation extends DB_DataObject { ###START_AUTOCODE /* the code below is auto generated do not remove the above tag */
   var $__table = 'SongEvaluation';                  // table name
   var $ID;                              // int(4)  not_null auto_increment
... <snip> ...
   var $Notes;                           // char(255)    ... <snip> ...
/* Static get */ function staticGet($k,$v=NULL) { return DB_DataObject::staticGet('DataObjects_SongEvaluation',$k,$v); } /* the code above is auto generated do not remove the tag below */ ###END_AUTOCODE } Don't why it thinks it is only 255. Did try manually changing the comment, to no effect. I query the row, using by an id passed into the webpage, like so:- $SongID = 0; $seDO = DB_DataObject::factory('SongEvaluation'); if ( isset($_REQUEST['SongID']) ) { $SongID = $_REQUEST['SongID']; $seDO->get( $SongID ); } Then a print_r($seDO); will reveal that only the first 255 chars have been queried from the database. What am I doing wrong? Thanks, Arthur

« previous php.pear.general (#17417) next »