From:             pawel at pawelgorny dot com
Operating system: Windows 2000
PHP version:      4.3.9
PHP Bug Type:     ODBC related
Bug description:  You cannot send any query until last procedure' all results are read.

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 bug report at http://bugs.php.net/?id=30474&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30474&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30474&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30474&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=30474&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=30474&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=30474&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=30474&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=30474&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=30474&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=30474&r=notwrong
Not enough info:             http://bugs.php.net/fix.php?id=30474&r=notenoughinfo
Submitted twice:             http://bugs.php.net/fix.php?id=30474&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=30474&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30474&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=30474&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=30474&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=30474&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=30474&r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=30474&r=mysqlcfg

Reply via email to