php-db | 2001011

Re: [PHP-DB] IBM DB2 and DSN From: szii <email protected>
Date: 01/04/01

Hiyas.

> I failed twice so I just added another entry to the catalog. If you
> know how to delete an entry in the catalog please tell me. The manual
> was to hard to lookup for the solution.

You can "db2 uncatalog..." to remove your database entries.

> $ db2 connect to SAMPLE0 user db2inst1 using ibmdb2
> SQL0332N There is no available conversion for the source code page "819"
to
> the target code page "954". Reason Code "1". SQLSTATE=57017
>
> I couldn't find how to unset code page conversion or set source code
> page to "954". If you know the way please tell me.
>
> I wonder why this mismatch happened. Both machines use the same locale
> 'ja_JP.ujis'. It may be cause by the difference of localedata, but I'm
> not sure.
>

Unfortunately I've not dealt with codepage issues, but if you look up the
code page codes on the IBM website it may give you a starting point.
Maybe one's set to a localized dialect, or Unicode, or something that
may be close but not exactly the same. I can't help much here...

> Oh, and either run Apache as your db2inst1 user (or whomever you've
> > setup) or make sure you get all of the exports from the
db2profile/db2cshrc
> > files and have them in the envirionment before you call odbc_connect().
> > If your env's not setup right, you'll get bogus SQLState error messsages
> > (random garbage.)
>
> How can I source /home/db2inst1/sqllib/db2profile or
> /home/db2inst1/sqllib/db2cshrc with php? Or is there some convenient
> function to use?
>
> I added /usr/IBMdb2/V6.1/lib to /etc/ld.so.conf. Isn't it enough?

If you're getting valid DB2 error messages, then you're obviously talking
to the database, and your ENV and such are setup correctly. Work
through the codepage stuff and you should be good to go.

Take care!

-Szii

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe <email protected>
For additional commands, e-mail: php-db-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>