permaculture playing cards
The moose likes JDBC and Relational Databases and the fly likes Oracle Connectivity with thin drivers !! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Oracle Connectivity with thin drivers !!" Watch "Oracle Connectivity with thin drivers !!" New topic

Oracle Connectivity with thin drivers !!


Joined: Feb 16, 2001
Posts: 3
I want to make a Database Connection to Personal oracle 8 using thin driver I am using windows98 and personal oracle. It compiles properly but when I run it i get the following SQL error :
"error My Own Sql error:IO exception:The network Adapter cannot establish the connection ".
I havent made a SID in my oracle. Is a SID important?
oracle 8import java.sql.*;
public class Jdbc1test
static String DB,USER,PASS, Query;
static Connection connection;
static Statement stmt;
static ResultSet rs;
public static void main(String args[])
connection=DriverManager.getConnection ("jdbc racle:thin:@ rcl","scott","tiger");
Query="select * from emp";
while( // while loop
int s1=rs.getInt("empno");
String s2=rs.getString("ename");
System.out.println(s1+ " " + s2);
} // end of try
catch(ClassNotFoundException e)
System.out.println("Error My Own class not found : "+e.getMessage());
catch(SQLException e)
System.out.println("Error My Own sql error: "+e.getMessage());
catch(Exception e)
System.out.println("Error My Own other errors: "+e.getMessage());
}// end of main
}// end of class
Frank Carver

Joined: Jan 07, 1999
Posts: 6920
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please choose a new name which meets the requirements.

Read about me at ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
I agree. Here's the link:
subject: Oracle Connectivity with thin drivers !!
It's not a secret anymore!