Hi,

I'm trying to write a PHP app that accesses a Progress database.

version info:
 - Windows 2000 Pro + Apache 1.3.14
 - PHP 4.0.4pl1 (4.0.5 just wouldn't work on my machine)
 - Progress 8.3.B
 - Merant Progress ODBC drivers v 3.50

the ODBC drivers seem to be fine - I made a MS Access database
and linked a bunch of Progress tables in there with Get External
Data / Link tables. I can view/query them just fine.

now, I tried a simple PHP app:

 --- 8< ---

<?
  $DBH=odbc_connect("mgauto","","","");
  $sth=odbc_exec($DBH,"SELECT Trkoodi,Trnimi FROM Turyhma"); 
  while(odbc_fetch_row($sth))
  {
    echo "<li> ".odbc_result($sth,"Trkoodi")." - ".odbc_result($sth,"Trnimi");
  }
  odbc_close($DBH);
?>

 --- 8< ---

The odbc_exec() query seems to be fine (when i do "echo $sth" after
the exec, i get "Resource id #2"). but the odbc_fetch_row() really
acts weird - it always returns true so it ends up in endless loop.
the odbc_result() calls return empty strings.

I've tried the odbc_connect() with all the possible cursor types,
doesn't help.

I've tried something like that:

 --- 8< ---

$i=1;
while(1)
 {
  if (!odbc_fetch_row($sth,$i)) break;
  echo "<li> ".odbc_result($sth,"Trkoodi")." - ".odbc_result($sth,"Trnimi");
  $i++;
 }

 --- 8< ---

didn't work either. :(


as a really stoopid thing, I tried creating an ODBC source for the
Access database I created before (with the Progress tables linked
in via ODBC). now I connected to the Access database via ODBC in
PHP and tried to query the Progress tables linked into the Access.
everything worked fine - I could access all the information in
Progress.


any other ideas?


Rgds,
  Tfr

  --==< [EMAIL PROTECTED] >==< http://tfr.cafe.ee/ >==< +372-50-17621 >==-- 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to