Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jdbc connection with oracle 10g

 
swapna marepally
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please provide me the code

what should i give at class.forName()
and what to put in the getConnection()
my user is hr and password is also hr
as it was given by the product when i installed

service name is oracle

when i run this program it is throwing ClassNotFoundException and
at getConnection method UnReportedException

i have set the class path like this
set CLASSPATH=ojdbc14.jar
and when i say %CLASSPATH% to check the classpath
it is not showing the classpath instead it is opening the ojdbc14.jar related window

please help in this problem

thanks in advance
 
Muhammad Saifuddin
Ranch Hand
Posts: 1324
Android Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Sturrock reply,

This is covered in Oracle's documentation, all we could do here is repeat what is written. Read the "JDBC Developer's Guide and Reference". If you are still confused feel freee to ask more questions.


follow this link where most of parts of your question is already covered.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic