aspose file tools*
The moose likes JDBC and the fly likes Java to Oracle Database Connection using Pure Driver Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Java to Oracle Database Connection using Pure Driver" Watch "Java to Oracle Database Connection using Pure Driver" New topic
Author

Java to Oracle Database Connection using Pure Driver

ran aero
Greenhorn

Joined: Mar 16, 2001
Posts: 1
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

Joined: May 29, 2001
Posts: 113
You must create ODBC DSN iview
Control Panel->ODBC


Senior software engineer
Stanley Tan
Ranch Hand

Joined: May 17, 2001
Posts: 243
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

Joined: Aug 29, 2003
Posts: 1
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

Joined: Jul 09, 2001
Posts: 1879

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

Joined: Sep 13, 2003
Posts: 11
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

Joined: Sep 13, 2003
Posts: 11
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java to Oracle Database Connection using Pure Driver