db->getDriverName(); if($sDatabasetype=='sqlsrv' || $sDatabasetype=='mssql' || $sDatabasetype=='dblib') { $this->data=$this->hexToStr($this->data); } // Postgres delivers a stream pointer if (gettype($this->data)=='resource') { $this->data=stream_get_contents($this->data,-1,0); } return parent::afterFind(); } private function hexToStr($hex){ $string=''; for ($i=0; $i < strlen($hex)-1; $i+=2){ $string .= chr(hexdec($hex[$i].$hex[$i+1])); } return $string; } } ?>