This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
I am trying to connect to oracle 8i using oracle 8.1.6 thin driver but with little luck. My computer environment is WINNT 4.0.1 ORACLE 8i JDK 1.2 ORACLE 8.1.6 OCI THIN DRIVER
can anybody help on the steps required to connect to oracle All help appreciated
Anonymous
Ranch Hand
Joined: Nov 22, 2008
Posts: 18944
posted
0
Hi Valli static{ try{ Class.forName("oracle.jdbc.driver.OracleDriver"); Connection con=DriverManager.getConnection ("jdbc racle:thin:@localhost:1521 rcl","scott","tiger"); }catch(Exception e){} go to oracle sight /download section it will ask u to create a login ..creaTE IT THEN U WILL GET A LIST OF ALL DOWNLOADABLES SELECT ORACLE JDBC DRIVER THEN U WILL GET THE LIST ALL THE DRIVER INFO DOWNLOAD JDBC-THIN 100%JAVA (CLASSES12.ZIP,1.5MB) (THIN DRIVER) FOR ORACLE SET THE CLASS PATH FOR CLASSES12.ZIP FILE FOR U R CODE THEN COMPILE U R CODE IF U UNZIP THE FILE U CAN SEE THE SUB DIR ORACLE/JDBC/DRIVER/OracleDriver.class u need to set class path for oracle dir "localhost" is u r machine & "1521" is a port number on which oracle service is running & "orcl" is host String if u have any more problems u can mail me ravi_gali@hotmail.com ravi
Anonymous
Ranch Hand
Joined: Nov 22, 2008
Posts: 18944
posted
0
Hi Valli static{ try{ Class.forName("oracle.jdbc.driver.OracleDriver"); Connection con=DriverManager.getConnection ("jdbc racle:thin:@localhost:1521 rcl","scott","tiger"); }catch(Exception e){} go to oracle sight /download section it will ask u to create a login ..creaTE IT THEN U WILL GET A LIST OF ALL DOWNLOADABLES SELECT ORACLE JDBC DRIVER THEN U WILL GET THE LIST ALL THE DRIVER INFO DOWNLOAD JDBC-THIN 100%JAVA (CLASSES12.ZIP,1.5MB) (THIN DRIVER) FOR ORACLE SET THE CLASS PATH FOR CLASSES12.ZIP FILE FOR U R CODE THEN COMPILE U R CODE IF U UNZIP THE FILE U CAN SEE THE SUB DIR ORACLE/JDBC/DRIVER/OracleDriver.class u need to set class path for oracle dir "localhost" is u r machine & "1521" is a port number on which oracle service is running & "orcl" is host String if u have any more problems u can mail me ravi_gali@hotmail.com ravi
Anonymous
Ranch Hand
Joined: Nov 22, 2008
Posts: 18944
posted
0
Example code that work in on my machine... WINNT 4.0 ORACLE 7.3.4 JDK 1.3 JDBC 2.0 ORACLE THIN DRIVER from CLASS111.ZIP (added to my CLASSPATH) /* A modified version of sample code provided by sun Copyright 1997, 1998, 1999 Sun Microsystems, Inc. All Rights Reserved. */ <code> import java.sql.*;
public class CreateCoffees { public static void main(String args[]) {
} catch(SQLException ex) { System.err.println("SQLException: " + ex.getMessage()); } } } </code> Fyi, OCI my not be support by you driver... Hope this helps... Monty6
[This message has been edited by monty6 (edited September 11, 2000).]
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.