Trapping mssql raiserror statements in PHP4 via FreeTDS

From: Date: Wed, 08 May 2002 15:32:15 +0000
Subject: Trapping mssql raiserror statements in PHP4 via FreeTDS
Groups: php.db 
Request: Send a blank email to php-db+get-19044@lists.php.net to get a copy of this message
I've successfully installed and have been using FreeTDS 0.53 with Apache 1.3.23 and PHP 4.1.2 to port over a data-driven web site that uses MS SQL Server 7.0. Everything seems to work EXCEPT, I cannot seem to get error messages back from MS SQl stored procedures that call the RAISERROR function. As long as you turn on track_errors in the php.ini file, you should be able to call mssql_get_last_message after calling mssql_query (to execute the stored procedure which calls RAISEROR('QueryLimit',9,1)) and mssql_get_last_message should return the string 'QueryLimit' but it is not. Any ideas before I dig into the source code? I'm suspecting this is a freetds issue? Mark

« previous php.db (#19044) next »