#20861 [Com]: sybase_query fail to handle stored procedure result with "nocount" option
| From: | csollet at coleebris dot com | Date: | Fri, 06 Dec 2002 16:48:03 +0000 |
| Subject: | #20861 [Com]: sybase_query fail to handle stored procedure result with "nocount" option | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-26859@lists.php.net to get a copy of this message | ||
ID: 20861
Comment by: csollet@coleebris.com
Reported By: csollet@coleebris.com
Status: Open
Bug Type: Sybase-ct (ctlib) related
Operating System: Linux
PHP Version: 4.3.0RC2
New Comment:
After some more test, i can get the notice (notice -> no result)
without "set nocount on". Don't have pushed further since the procedure
involved is about 400 lines with call to others procedures.
So, just to add that "set nocount on" is a case, not the only one, that
trigger the error.
Previous Comments:
------------------------------------------------------------------------
[2002-12-06 09:53:00] csollet@coleebris.com
Test script :
<?
$sy = sybase_pconnect('DBHOST', 'user', 'pass');
sybase_select_db('MyDB', $sy);
sybase_query("test_bug 1", $sy);
?>
produce :
Notice: sybase_query() [http://www.php.net/function.sybase-query]:
Sybase: Unexpected results, cancelling current in - on line 4
with test_bug defined as follow :
create procedure test_bug
@input int
AS
BEGIN
set nocount on
select @input 'result'
return 2
END
Removing the "set nocount on" lead to expected result but, of course,
in real wold sp, the nocount option is rarely used for fun...
Build with Sybase ctclient v12.5
Works perfectly well with 4.2.3 and previous.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=20861&edit=1