|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-01-18 17:19 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 17:00:02 2025 UTC |
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]