This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java to Oracle Database Connection using Pure Driver

 
ran aero
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, pls help me out
how do u connect to Oracle8 database using oracle pure driver
ive been connecting using JDBC-ODBC drivers for my project work
now they wanna use pure drivers pls help me as soon as possible
I use the code like this
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection
("jdbc dbc:iview","scott","tiger");
hoe should i change the code
 
Dorj Galaa
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You must create ODBC DSN iview
Control Panel->ODBC
 
Stanley Tan
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First get the proper Oracle drivers and stick it in your classpath. I'm sure there are instructions on how to connect.
 
B Subramaniam
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Ran,
As a first step have some pure-oracle driver at your place. I use oracle_thin_driver. For that, the code something goes like that:
class.forName("oracle.jdbc.driver.OracleDriver");
Connection con = DriverManager.getConnection("jdbc racle:thin:@192.26.32.51:1521","user-name","password");
url is "jdbc racle:thin:@<where driver is located> ortNO".
I hope this will solve your problem. Good Luck!!!
 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you may or may not be surprised that Oracle has extensive online tutorials and the best JDBC documentation I've seen. You can find everything you need to start with Oracle/JDBC at the Oracle9i JDBC Developer's Guide and Reference site. ( you need to register for an Oracle site username and password )
Jamie
 
srinivasa reddy
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,
I am using WSAD5.0 and Oracle9i in Windows XP OS.
I am just trying to get the data from EMP Table from a servlet.I have included c:\oracljdbc\lib\classes12.jar in my project-->properties-->buildpath-->
Its giving the following error
java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriverno result
I think there is some problem with class path.
Could you please tell me what i need to do for fixing this error?
Thanks alot
Srini
 
srinivasa reddy
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,
I am using WSAD5.0 and Oracle9i in Windows XP OS.
I am just trying to get the data from EMP Table from a servlet.I have included c:\oracljdbc\lib\classes12.jar in my project-->properties-->buildpath-->
Its giving the following error
java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriverno result
I think there is some problem with class path.
Could you please tell me what i need to do for fixing this error?
Thanks alot
Srini
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic