db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dyre.Tjeldv...@Sun.COM
Subject Re: Problem connection to derby with PHP using PDO or ibm_db2 (Linux)
Date Wed, 25 Jun 2008 11:08:44 GMT
David Rekowski <david.rekowski@gmx.de> writes:

> Hello list!
>
> My aim is to get PHP to connect and work with Apache Derby. (See end of
> message for system and versions)
>
> I tried to follow Dan Scotts slightly outdated tutorial from
> http://coffeecode.net/archives/16-Apache-Derby-tutorial-OSCON-2005-materials.html
>
>
> PDO works for example with mysql, but when I try to connect to derby via
> PDO like this
> $DSN = "DRIVER={IBM DB2 ODBC
> DRIVER};PROTOCOL=TCPIP;DATABASE=MYDB;HOSTNAME=localhost;PORT=1527";
> $dbh = new PDO("odbc:$DSN");

Have you actually downloaded and installed the DB2 ODBC driver on your
system? It doesn't come with Derby, and last time I checked it was only
distributed as closed source, and only for certain platforms...
It was available on Linux, but you needed root access to install it, if
I remember correctly.

The DB2 ODBC driver should work with a Derby Network Server as they both
use the DBMS-indpendent DRDA protocol...


-- 
dt

Mime
View raw message