View Single Post
  #1 (permalink)  
Old 07-10-2007, 09:33 PM
creativehacker creativehacker is offline
Member
 
Join Date: Jun 2007
Posts: 11
creativehacker is on a distinguished road
JDBC driver connection problem
When I execute the below program I am getting the following error please help me..I have set class path to ojdbc14.jar also.. please help
Code:
import java.sql.*; public class Con2{ public static void main(String a[]) throws Exception{ Driver drv=new oracle.jdbc.driver.OracleDriver(); DriverManager.registerDriver(drv); System.out.println("h"); Connection con=DriverManager.getConnection("jdbcracle:thin:@localhost:1521rcl","scott","tiger"); System.out.println("--connected-->"+con.getClass()); }}
Code:
Exception in thread "main" java.sql.SQLException: Io exception: The Network Adapter could not establish the connection at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java :125)....
Reply With Quote
Sponsored Links