progress / php / odbc problem

progress / php / odbc problem

Post by indrek siita » Wed, 09 May 2001 22:58:15


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

$sth=odbc_exec($DBH,"SELECT Trkoodi,Trnimi FROM Turyhma");
echo "<li> ".odbc_result($sth,"Trkoodi")." - ".odbc_result($sth,"Trnimi");



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

if (!odbc_fetch_row($sth,$i)) break;
echo "<li> ".odbc_result($sth,"Trkoodi")." - ".odbc_result($sth,"Trnimi");


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

any other ideas?



1. Connect PHP with Progress via OIB/OID/ using ODBC for SQL89

Hello boys!?

Use Progrerss 9.1b in a Win98.

I am interested in being able to use the OIB/OID, to generate connections
among Progress and PHP, in the Win98... running Apache for Win32.

I know that I should use a driver ODBC to connect me with the OIB OID... and
that should be compatible with SQL89... but?  Where it with himself, or it
is provided Progress?

I was experiencing with the Driver Merant 3.60 for SQL92, and walks very
well but my intension is to use SQL89/OIB/OID.

Some aid?

Thanks.  MArio.-

2. output query results to a text file

3. [PHP] RPMs for PHP accessing PostgreSQL via ODBC over RedHat

4. runtime database

5. ODBC error:[MERCHANT][ODBC PROGRESS driver][PROGRESS]Server not reachable or possable RPC error

6. DBGrid, ODBCDirect and updatable recordsets

7. PHP/ODBC/ORACLE - Problem

8. query

9. Problem with ODBC Connection to DB2 via PHP

10. PHP ODBC - MS Access : table name problem

11. PHP+Progress

12. php + progress

13. Progress serveur and Kylix or PHP