• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

how to connect db2 with java application

 
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
can some one give me the source code to know
how to connect the db2 database from java application
on windows environment.
i want to know all 4 drivers sample code and also
let me know what are the things (drivers) i have to
down load and classpath settings??
thnx in advance for ur help
cya
tausif
 
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A good place to start is Sun's JDBC Drive Search page. You can search for any vendor who provides a DB2 driver, based on the type, the API version, etc. The site lists both free drivers and commercial products.
The results of the search will contain a URL to the driver page where you can download the driver. I've found that most downloads come with documentation and sample code that will help you get started.
 
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Tausif Khanooni:
hi,
can some one give me the source code to know
how to connect the db2 database from java application
on windows environment.
i want to know all 4 drivers sample code and also
let me know what are the things (drivers) i have to
down load and classpath settings??
thnx in advance for ur help
cya
tausif


Instead of me typing out a books worth of code and samples, you can go to here and download the JTOpen drivers for DB2. They work great. To connect, try the following ( after adding it to your classpath )

hope this helps,
Jamie
 
Run away! Run away! Here, take this tiny ad with you:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic