PHP:PDO and odbc connection parameters for Progress 10.2B ODBC Driver

RichardVohs

ProgressTalk.com Sponsor
Anyone successfully connected to OpenEdge 10.2B db using PHP:pDO and Progress 10.2B ODBC Driver?

Example:

$dsn = "blahblahdsn";
$userid = "blahmama";
$pwd = "blahblahblah";
try {
$dbh = new PDO($dsn, $userid, $pwd);
} catch (PDOException $e) {
echo 'Connection failed: ' . $e->getMessage();
}
 

RichardVohs

ProgressTalk.com Sponsor
Both, always curious, but hitting an error now.

Using $dsn = "odbc:blahblahdsn", error returned is:
Connection failed: could not find driver
- which makes me think that i need more info in the $dsn entry in order for this to work.

Using $dsn = "blahblahdsn", error returned is:
Connection failed: invalid data source name
- 'blahblahdsn' is available (and I swear was working just the other day). Wondering what could have changed with entry, driver to make it stop working.


*** EDITED ***
Found the issue why it was working one day and not the next.

$dsn = "odbc:blahblahdns" is the proper usage.

However, in php.ini file the following extension needs to be enabled:
extension=php_pdo_odbc.dll

I'm on a development box that may have had its settings monkeyed with, unbeknownst to me. Now who's the monkey?
 

RealHeavyDude

Well-Known Member
Glad you found the problem. Usually connection problems via ODBC/JCBC usually are a result of not having configured the SQL access on the database properly.

Heavy Regards, RealHeavyDude.
 
Top