By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,586 Members | 2,418 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,586 IT Pros & Developers. It's quick & easy.

using jdbc to connect to db2

P: n/a
Hi all,

I am pretty new to JDBC and I am trying to write a simple application
to connect to a db2 database residing on a different machine.

I am looking for a code snippet and the neceesary steps in order to
establish the connection to the database and to send some simple
"SELECT" statements to the database.

I would really appreciate if somone could point me to the right
direction in this regards.

Thanks,
Rob

Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
You will need to specify what type of connection you will be making to
the database. If the system you are running the program on has UDB
client code installed and the database is cataloged; you can use the
(older) type 2 connection. The alternative is to use a direct java
connection to the database. This requires that appropriate code be
running on the server. The specific version of db2 you are connecting to
will have an influence on the connection options available to you.

All of this is documented, with examples, in the application programming
guides.

Phil Sherman

r_**********@yahoo.com wrote:
Hi all,

I am pretty new to JDBC and I am trying to write a simple application
to connect to a db2 database residing on a different machine.

I am looking for a code snippet and the neceesary steps in order to
establish the connection to the database and to send some simple
"SELECT" statements to the database.

I would really appreciate if somone could point me to the right
direction in this regards.

Thanks,
Rob

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.