Prabhudeva Chethan wrote:
>
> Hi all,
>
> how to connect to db2(UDB) from a servlet ???any help is appreciated as i am
> facing trouble in this!!!
DB2 JDBC driver uses native calls to C libraries. So I have set
these enviroment variables for the JVM:
export CLASSPATH=CLASSPATH:/usr/lpp/db2_02_01/java/db2java.zip
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lpp/db2_02_01/lib
export LANG=en_US
export DB2INSTANCE=psadmin
This is for my DB2 v2.01 on AIX, supply proper path for your instalation
and proper instance name.
If you don't call JDBC driver by Class.forName() then also
supply following as command line parameter to JVM:
-Djdbc.drivers=COM.ibm.db2.jdbc.app.DB2Driver
Hope this helps
Martin
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
INET, a.s. Mgr. Martin Kuba
Kralovopolska 139 e-mail: [EMAIL PROTECTED]
601 12 Brno WWW: http://www.inet.cz/~makub/
Czech Republic tel: +420-5-41242414/33
--------------------------------------------------------------------
PGP fingerprint = D8 57 47 E5 36 D2 C1 A1 C3 48 B2 59 00 58 42 27
http://wwwkeys.cz.pgp.net:11371/pks/lookup?op=index&search=makub
--------------------------------------------------------------------
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html