Java to Oracle Database Connection using Pure Driver
ran aero
Greenhorn
Joined: Mar 16, 2001
Posts: 1
posted
0
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
posted
0
You must create ODBC DSN iview Control Panel->ODBC
Senior software engineer
Stanley Tan
Ranch Hand
Joined: May 17, 2001
Posts: 243
posted
0
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
posted
0
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!!!
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
posted
0
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
posted
0
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