note 95118 modified in function.odbc-binmode by danbrown
| From: | danbrown@php.net | Date: | Mon, 14 Dec 2009 16:58:07 +0000 |
| Subject: | note 95118 modified in function.odbc-binmode by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-163949@lists.php.net to get a copy of this message | ||
For Sybase users (this probably applies to MS-SQL Server as well) who are using ODBC:
I was using the same code as mizmerize, but I was getting truncated data back from the server (at
the 32kb mark) when selecting data with the image datatype. My Sybase server has a @@textsize
property of 2Gb, which should be plenty. But apparently, the php ODBC driver resets this to 32Kb
when a connection is made, and then sets it back to 2Gb after. The solution is to do a query:
<?php odbc_exec($connH, "set textsize 131072"); ?>
immediately before your main query, in mizmerize's code. That should override the default
setting.
--was--
For Sybase users (this probably applies to MS-SQL Server as well) who are using ODBC:
I was using the same code as mizmerize, but I was getting truncated data back from the server (at
the 32kb mark) when selecting data with the image datatype. My Sybase server has a @@textsize
property of 2Gb, which should be plenty. But apparently, the php ODBC driver resets this to 32Kb
when a connection is made, and then sets it back to 2Gb after. The solution is to do a query:
odbc_exec($connH, "set textsize 131072");
immediately before your main query, in mizmerize's code. That should override the default
setting.
http://php.net/manual/en/function.odbc-binmode.php