ID:               42127
 User updated by:  hbouslama at edison dot ca
 Reported By:      hbouslama at edison dot ca
 Status:           Open
 Bug Type:         ODBC related
 Operating System: Win 2000
 PHP Version:      5.2.3
 New Comment:

Hi,
I called a technical support of DataDirect and they asked me if php is
compatible with SQL89
So I transfer the question to you guys ;-)

Could any body answer me please?

Hichem


Previous Comments:
------------------------------------------------------------------------

[2007-07-27 15:15:41] hbouslama at edison dot ca

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 this bug report at http://bugs.php.net/?id=42127&edit=1

Reply via email to