#30474 [Opn->Bgs]: You cannot send any query until last procedure' all results are read.

From: Date: Tue, 18 Jan 2005 16:19:24 +0000
Subject: #30474 [Opn->Bgs]: You cannot send any query until last procedure' all results are read.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-72399@lists.php.net to get a copy of this message
ID: 30474 Updated by: tony2001@php.net Reported By: pawel at pawelgorny dot com -Status: Open +Status: Bogus Bug Type: ODBC related Operating System: Windows 2000 PHP Version: 4.3.9 New Comment: Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PHP. Not PHP problem - Microsoft ODBC driver doesn't support multiple active statements on the same connection. Previous Comments: ------------------------------------------------------------------------ [2004-10-18 20:18:37] pawel at pawelgorny dot com Description: ------------ I work on SQL SERVER 2000. When You do odbc_connect() and query 'SELECT', it returns a few rows. In every moment You may stop read it and send another query. But if first You send query 'EXEC MyProcedure', You have to wait until all rows are read. If you send a query, there is an error [ODBC DRIVER - Busy]. What is problem: If I run a procedure which returns some rows, and for every row I want to make something other in base (INSERT in other table etc) there is an error. I can't do anything until the whole procedure' result is read. This error doesn't appear for 'SELECT' - not 'EXEC procedure' Reproduce code: --------------- OK: $id=odbc_connect(); $sql='exec something'; $res=odbc_exec($id,$sql); while ($row=odbc_fetch_object($res)) {something} $sql='exec something'; $res=odbc_exec($id,$sql); ERROR: $id=odbc_connect(); $sql='exec something'; $res=odbc_exec($id,$sql); $sql2='exec somethingDiffernet'; $res2=odbc_exec($id,$sql2); ERROR: $id=odbc_connect(); $sql='exec something'; $res=odbc_exec($id,$sql); $id2=odbc_connect(); $sql2='exec somethingDiffernet'; $res2=odbc_exec($id2,$sql2); Expected result: ---------------- I want to run second (and next) queries (procedures) without waiting for full-read first results. Actual result: -------------- [Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt [#0] ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=30474&edit=1

« previous php.bugs (#72399) next »