• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Oracle connectivity

 
Aravind Prasad
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sebo ,
now i'm doing a program for connecting to java with oracle..
for that .. what should be the class.forname

i've given...
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

then the connection

Connection dbCon;

dbCon = DriverManager.getConnection("jdbc racle://192.168.0.4:1521/lib","aravindprasad","2356296");


i've given the DSN as lib..
but its showing an error message..

java.sql.SQLException: No suitable driver

what is the problem..

help me.. for fixing this problem
 
Shrinivas Mujumdar
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Aravind,
You are loading Type 1 driver & while making a connection specifying URL of Type 4 driver
use

Where myDSN is a DSN you must configure in your system using control panel.

or change Drivername to
oracle.jdbc.driver.OracleDriver
i.e


I hope this helps
Shrinivas
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic