|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2008-10-09 05:55 UTC] manohar dot angani at gmail dot com
Description:
------------
We are using freetds .64 and it gives us an error when the same procedure is invoked twice with the same parameter.
Error: the XML response that was returned from the server is invalid.
Received:
sp_helpconstraint_new mt_cell_pull
passed
Array
(
[0] => 00000
[1] => 0
[2] => (null) [0] (severity 0) [(null)]
[3] => 0
[4] => 0
)
<pre>1</pre>
sp_columns mt_cell_pull
passed
sp_helpconstraint_new mt_dimension_selected
passed
Array
(
[0] => 00000
[1] => 0
[2] => (null) [0] (severity 0) [(null)]
[3] => 0
[4] => 0
)
<pre>1</pre>
sp_columns mt_dimension_selected
passed
sp_helpconstraint_new mt_cell_pull
passed
Array
(
[0] => HY000
[1] => 20019
[2] => Attempt to initiate a new Adaptive Server operation with results pending [20019] (severity 7) [(null)]
[3] => 0
[4] => 7
[5] => Success
)
<pre>1</pre>
DBEntidad::DBEntidad - tableInfo without data - Table: mt_cell_pull-Query Error: Attempt to initiate a new Adaptive Server operation with results pending [20019] (severity 7) [(null)]
Expected result:
----------------
The SQL error is thrown by FreeTDS and it shouldn't throw it.
Actual result:
--------------
SQL error ..
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 20:00:02 2025 UTC |
Bug still in 5.4. Assuming, $db is a database object which provides a connection via PDO/dblib, try <? $con = $db->connect(); $query = $con->prepare("select id from table where param = ?"); while (true) { $query->bindParam(1, 4711); $query->execute(); while ($row = $query->fetch(PDO::FETCH_ASSOC) { (do something with result) } } ?> If you provide different values at $quer->bindParam(), it works OK, also, if you prepare the query always new within the while loop. If you reuse the prepared query with the same parameter as in the loop before, the mentioned error will occur.