Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

registering

 
amit bhadre
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1.How to connect/register to database without using the drivers?

I tried by using
DriverManager.getRegister("jdbc.odbc.driver.Oracle");

Not working.

2. How you will connect/register to database without using Class.forName("");?

thanking in advance.

regards
amit bhadre
 
steve souza
Ranch Hand
Posts: 862
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I haven't used oracles driver but typically you would do the following and the driver registers itself (via a static initializer).



Here is an article.

http://www.onjava.com/pub/a/onjava/synd/2001/08/21/jdbc.html
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!