[PHP] ODBC question
I have an Openlink Single Tier Driver on an XP pro machine with windows installed on drive f: because I have a dual boot with Red Hat. Database is Progress 8.3c on a SCO Unixware 7.1.4 Dell Server. I can connect to all progress databases and pull data utilizing a System DSN via Openlink, however when I try to connect via PHP I get the following error: Warning: odbc_connect(): SQL error: [OpenLink][ODBC]Unable to allocate server handle, SQL state S1000 in SQLConnect Any suggestions? I know the code is fine, because it works on another box with a similar set up, but with windows installed on drive c: Thanks in advance, Jeremy Schreckhise -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ODBC question
Jeremy Schreckhise wrote: I have an Openlink Single Tier Driver on an XP pro machine with windows installed on drive f: because I have a dual boot with Red Hat. Database is Progress 8.3c on a SCO Unixware 7.1.4 Dell Server. I can connect to all progress databases and pull data utilizing a System DSN via Openlink, however when I try to connect via PHP I get the following error: Warning: odbc_connect(): SQL error: [OpenLink][ODBC]Unable to allocate server handle, SQL state S1000 in SQLConnect Any suggestions? I know the code is fine, because it works on another box with a similar set up, but with windows installed on drive c: Thanks in advance, Jeremy Schreckhise I did a search on that error + OpenLink and came up with this: http://support.openlinksw.com/support/print_opie_article.vsp?OP_ID=299 I did this once a long time ago (PHP/ODBC/Progress), but I don't see that error in my notes. The only thing I can offer is that I had trouble making sure the proper Progress environment variables ($DLC and the like) were set and accessible to PHP/Apache. If that doesn't help, try the OpenLink people. I had to place a support request with them before, and they were pretty helpful. kgt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] odbc question
$sql = SELECT * FROM users WHERE username='$username' AND password='$password'; $result = odbc_exec($dbConnection, $sql); while ($rows = odbc_fetch_array($result)) { //This doesn't work with odbc_fetch_object either print $rows-COLUMNNAME; } It's returning an array, not an object (I can't speak as to how the odbc_fetch_object function behaves - it seems poorly documented, but it looks like you get back something more fancy than a simple object with named variables). In short, use odbc_fetch_array and refer to the items as $rows[COLUMNNAME] (or use single quotes). - Martin Norland, Database / Web Developer, International Outreach x3257 The opinion(s) contained within this email do not necessarily represent those of St. Jude Children's Research Hospital. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php