I am trying to connect a db2 database using php. Now, i am gonna write some code similar to this(call a stored procedure):

```
$proc = 'CALL MyLib.MySP(?, ?, ?)'; 
$stmt = db2_prepare($conn, $proc) or die("db2_prepare failed<br>"); 

// Define input variable values // 
$paramIN1  = ...; 
$paramIN2  = ...; 
$paramOUT3 = ""; 

// Define parameters // 
db2_bind_param($stmt, 1, "paramIN1", DB2_PARAM_IN); 
db2_bind_param($stmt, 2, "paramIN2", DB2_PARAM_IN); 
db2_bind_param($stmt, 3, "paramOUT3", DB2_PARAM_OUT); 

// Display results set // 
if (db2_execute($stmt)) { 
    while ($row = db2_fetch_array($stmt)) { 
        print "  {$row[0]}, {$row[1]}, {$row[5]}<br>"; 
    } 
}

```

Connection code:

```
$user = 'user';
$password = 'pass';
$hostname = 'ip';
$db = 'db';
$conn_string = "DRIVER={IBM DB2 ODBC DRIVER};HOSTNAME=$hostname;PROTOCOL=TCPIP;UID=$user;PWD=$password;DATABASE=$db;";

$conn = db2_connect($conn_string, $user, $password);

```

Connection fails here. Error message returned from db2\_conn\_errormsg() is:

```
"[IBM][CLI Driver] SQL1032N No start database manager command was issued. SQLSTATE=57019 SQLCODE=-1032"

```

This is an AS/400 system. With odbc we can connect and talk to database without a problem.