This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes JDBC Connectivity Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC Connectivity" Watch "JDBC Connectivity" New topic
Author

JDBC Connectivity

Himanshu Khanna
Greenhorn

Joined: Aug 15, 2001
Posts: 29
Trying to connect to a remote DB (Personal Oracle 8.0.4 ) thru my Java program
First I tried using JDBC ODBC driver(sun.jdbc.odbc.JdbcOdbcDriver) . Here the run time error msg was -> java.sql.SQLException: [Microsoft][ODBC Driver Manager]Data source name or the established driver which is appointed are not found.
Than I moved to Oracle JDBC drive (oracle.jdbc.driver.OracleDriver).Now the run time error msg is ->java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
Kindly Help . I have to use Oracle driver as I believe they are faster than JDBC ODBC drivers.
Thanks
Sunetra Saha
Ranch Hand

Joined: Feb 25, 2001
Posts: 77
Check the classpath - whether all your jdbc drivers are in the classpath or not. This is usually the problem.
john_guthrie
Greenhorn

Joined: Jun 14, 2001
Posts: 16
For the ODBC problem, sounds to me (a unix guy) like you haven't defined the ODBC source to use.
For the other, as someone else has said, it's a classpath problem.
Also, can you connect to Personal Oracle remotely? I thought that was the one restriction that it had, only allowing localhost connectivity.
Himanshu Khanna
Greenhorn

Joined: Aug 15, 2001
Posts: 29
Yup , U are right Sunetra - setting the CLASSPATH solved the issue.
John , the 2 suggestions U have given are perfect.
ODBC - problem is DSN
Oracle - problem was CLASSPATH
Rgding connecting remotely to Personal Oracle , yes one can do so but U need to have Oracle Client installed(I think ).
 
wood burning stoves
 
subject: JDBC Connectivity
 
Similar Threads
Can not connect to Oracle DB from Netbeans 7
connection url
Oracle JDBC
Facing Problems with DataBase
getBlob() gives exception