DB2

General discussion on PHP

DB2

Postby pcwa2006 on Wed Feb 06, 2013 12:56 am

What I want to do is from a linux box with Zend Server 5.3 connect to an iSeries DB2 and simply do SELECT statements against it.

I have installed php-5.2-pdo-ibm-zend-server & php-5.2-ibmdb2-zend-server, and they show green in the server console.

I would think using the PDO would be the easiest. However I am having a hell of a time. Anyone have any tutorials on getting this to work?

I have tried:
Code: Select all
$db = new PDO("ibm:DRIVER={IBM DB2 ODBC DRIVER};DATABASE=S104557f;HOSTNAME=10.*.*.*;PORT=8472;PROTOCOL=TCPIP;", "****", "*****");


But I get:
SQLSTATE= , SQLDriverConnect: -1390 [IBM][CLI Driver] SQL10007N Message "0" could not be retrieved. Reason code: "3".
pcwa2006
 
Posts: 6
Joined: Thu Jan 21, 2010 6:13 pm

Re: DB2

Postby bvirzi on Tue Feb 12, 2013 10:17 am

Hi,

I know that to use a db2 function from windows to as400, you need an IBM product called "db2 connect" installed on windows. I don't know how it works with linux.

Benny
bvirzi
 
Posts: 27
Joined: Tue Nov 16, 2010 3:51 pm


Return to PHP

Who is online

Users browsing this forum: No registered users and 2 guests