From:             hbouslama at edison dot ca
Operating system: Win 2000
PHP version:      5.2.3
PHP Bug Type:     ODBC related
Bug description:  Getting data from ODBC connection to progress using MERANT 
(DataDirect 4.0)

Description:
------------
Hi every body,
I'm using PHP 5.2.3=>ODBC System DSN=>DataDirect 4.0=>Network Client for
Progress 91.E and finaly Apache2. 
All are installed on Win2000 and Progress on Unix

I succeed connecting to the ODBC DSN and I can display filds names
but I can't receive data, the number of rows received is 0
I tried displaying data using other tools like Aqua data studio, RazorSql,
Excel and Open Office all is going well. but not with PHP

I tried also to connect to a MySql database using ODBC and it works
correctly

In the error log there's no error reported


Thank you for your time and effort



Reproduce code:
---------------
$DBCon = &ADONewConnection(SQL_DRIVER);
$DBCon->PConnect(SQL_HOSTNAME,SQL_USERNAME,SQL_PASSWORD,SQL_DATABASE) or
die(' CONNECTION ERROR : '.odbc_errormsg());
if($DBCon)
 echo '<br>Connection established successfully';
$sql = 'SELECT CD_CIE, CD_SUCC FROM ACINTEL';
$result = $DBCon->Execute($sql);
if($result){
        echo '<br>Resultset is ok'.odbc_errormsg();
        echo '<br>Row count = '.$result->RowCount().".<br>";    
        echo '<br>Field count = '.$result->FieldCount().".<br>";        
        for ($i=0;$i<$result->FieldCount();$i++){
                $objField = $result->FetchField($i);
                echo "Field no $i = ". $objField->name."<br>";
        }
        echo 'Data : <br><pre>';
        while ($arr = $result->FetchRow()) {
                echo '<br>';
                print_r($arr);
        }
}

Expected result:
----------------
Connection established successfully
Resultset is ok
Row count = 3.

Field count = 2.
Field no 0 = CD_CIE
Field no 1 = CD_SUCC
Data : 
Array(
  [0]=>Array(
         [CD_CIE]=>Value1
         [CD_SUCC]=>Value2
       )
  [1]=>Array(
         [CD_CIE]=>Value3
         [CD_SUCC]=>Value4
       )
  [2]=>Array(
         [CD_CIE]=>Value5
         [CD_SUCC]=>Value6
       )
)

Actual result:
--------------
Connection established successfully
Resultset is ok
Row count = 0.

Field count = 2.
Field no 0 = CD_CIE
Field no 1 = CD_SUCC
Data : 

-- 
Edit bug report at http://bugs.php.net/?id=42127&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=42127&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=42127&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=42127&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=42127&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=42127&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=42127&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=42127&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=42127&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=42127&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=42127&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=42127&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=42127&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=42127&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=42127&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=42127&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=42127&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=42127&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=42127&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=42127&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=42127&r=mysqlcfg

Reply via email to