views:

293

answers:

0

I have the developer version of the Caché DB running locally. When I try to use PDO ODBC to connect to it I just get errors:

Connection failed: SQLSTATE[IM002] SQLDriverConnect: 0 [unixODBC][Driver Manager]Data source name not found, and no default driver specified

I've used several DSN statements such as:

#$conn = "odbc:host=127.0.0.1;namespace=SAMPLES;port=1972;uid=_SYSTEM;password=sys;protocol=TCP;trace=on";

$conn = "odbc:dsn=samples;driver=/usr/local/cacheodbc/bin/libcacheodbc.so;host=127.0.0.1;namespace=SAMPLES;port=1972;uid=_SYSTEM;password=sys;protocol=TCP;trace=on;TraceFile=iodbctrace.log;";

$dbh = new PDO($conn);

I have the odbc.ini and odbcinst.ini also setup in /etc and odbc_connect() works. Can anybody get me closer to connecting? I want to use PDO because eventually I want to use it in the Zend framework.