• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to connect db2 with java application

 
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic