freetds and set textsize behavior change

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For the last year or so I have been using php and freetds to access an MS SQL Server. Like others, I ran into the "SET TEXTSIZE" problem. To get around that I prepended the MS SQL command "SET TEXTSIZE 10000" to every SELECT query. This solved the problem. (E.g., "SET TEXTSIZE 10000 SELECT * FROM Users")

We are now upgrading our web server to the new version of PHP (4.3.1) and the new freetds distribution (0.61). It appears that this new release of freetds has an option in its configuration to automatically set the textsize so one no longer is obliged to prepend the SET TEXTSIZE command. That is all very fine, but now queries that have the SET TEXTSIZE at the start NO LONGER WORK. They return an empty result set.

For example, "SET TEXTSIZE 10000 SELECT * FROM Users" in the OLD version of PHP and freetds works fine, but it returns an empty result with the new versions. If we take out the SET TEXTSIZE 10000 it works in the new versions. The problem is we have many many pages with the SET TEXTSIZE at the beginnning of a query which will not work with the new versions of PHP and freetds.

I am suspicious that it is a PHP problem because "SET TEXTSIZE 10000 SELECT * FROM Users" works in Perl with DBD:Sybase which also uses freetds.

What has changed to make "SET TEXTSIZE 10000 SELECT * FROM Users" stop working? Short of editing all of our php web pages and taking out the SET TEXTSIZE part, is there a way we can get the new version of php to work with a query of the form "SET TEXTSIZE 10000 SELECT * FROM Users"?

Thanks.



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux