php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46262 FreeTDS error.
Submitted: 2008-10-09 05:55 UTC Modified: 2008-10-21 01:00 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: manohar dot angani at gmail dot com Assigned:
Status: No Feedback Package: MSSQL related
PHP Version: 5.2.6 OS: Linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [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 ..

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-10-14 00:57 UTC] kalle@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.


 [2008-10-21 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2012-03-19 13:15 UTC] programmer at finner dot de
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.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 04:01:38 2024 UTC