[DB_odbc] Setting the database outside the dns
| From: | Daniel García | Date: | Fri, 09 Jun 2006 07:28:37 +0000 |
| Subject: | [DB_odbc] Setting the database outside the dns | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-24294@lists.php.net to get a copy of this message | ||
Hello all,
I want to retrieve the list of tables from an iSeries (AS/400) DB
connected through odbc. For that purpose, I have implemented the method
getSpecialQuery in a class that extends odbc driver.
The problem is that I need to know the database name for which the
tables shoud be retrieved. I cannot specify it in the dsn (for example,
odbc_iseries://user:pass@dsn/database) because connection fails:
DB::connect method thinks that 'database' is the 'dsn'. Besides, method
getSpecialQuery accepts only one parameter (query type), since
supposedly the required information can be retrieved by other means.
One (dirty) solution could be adding a second parameter to
getSpecialQuery in the extended class, but it does not seem the proper
way to me.
I wonder if that can be considered a problem to be solved in the odbc
driver, or there are other ways to specify the database I'm not aware of.
TIA, and happy pearing :-)
=====================================
Daniel García=====================================