I was wondering if someone could point me in a direction regarding a
db2_prepare statement. In my connection options, I specify a library list.
However, with or without the library list, I still have to fully qualify
the database name in the query. Otherwise, I get a db2_prepare():
Statement Prepare Failed in error.


$database['options'] = array('i5_libl' => 'CUSLIB',
'i5_naming' => 'DB2_I5_NAMING_ON'
);

$conn = db2_connect($database['server'],
$database['username'],
$database['password'],
$database['options']
);

if($conn){
print 'Connection successful.';

$params = array('123456789', 'MYLASTNAME');
$query = "SELECT count(*) FROM CUSLIB.CUSLOC WHERE locid = ? AND
lastname = ?";
$stmt = db2_prepare($conn, $query);

}else{
print 'Connection failed.';
}



Should I not be able to just use the library list without fully qualifying
the database in the SQL statement?

-JA-

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.