PHP 5.2.6 cannot read result set from MSSQL stored procedure with tdsodbc 0.82-3

Bug #349205 reported by Wes Grant
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
freetds (Ubuntu)
New
Undecided
Unassigned

Bug Description

Upgraded from Ubuntu 8.04 to 8.10. PHP code that worked on 8.04 ceased to work on 8.10:

    $db_result = odbc_exec($db_connection, $stored_procedure_sql);
    if($db_result){
      if (odbc_num_rows($db_result)){ // this would = -1 when I know the it should >1
        $i = 0;
        do{
          while(@$row = odbc_fetch_array($db_result)){
            $db_recordset[$i][] = $row;
          }
          $i++;
        } while (odbc_next_result($db_result)); // this doesn't happen. Result set is completely empty.
      }

I set the FreeTDS driver to write debugging information to a log file. I could see that the stored procedure ran successfully and 200 results were returned. However, PHP can't seem to read them.

I re-installed php5-odbc, and all of the FreeTDS packages. No Joy. Eventually I downgraded FreeTDS back to version 0.63-3.2ubuntu1. Everything works fine in that version.

Wes Grant (wesley-grant)
description: updated
Revision history for this message
dominique desforges (dominiquedesforges69) wrote :

thanks you for your suggest and post bless

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.