| Author |
SQLException: The Network Adapter could not establish the connection?? what it means
|
Bhasker Reddy
Ranch Hand
Joined: Jun 13, 2000
Posts: 176
|
|
|
what does it mean, what error is it exactly
|
Bhasker Reddy
|
 |
lokesh reddy
Ranch Hand
Joined: Sep 15, 2000
Posts: 66
|
|
Can u please paste the code u r using to connect to the sql server. for example: Class.forName("jdbc dbc:......"); Connection con=DriverManager.getConnection(.....) and also please mention, what type of sql server u r trying to connect.
|
 |
Bhasker Reddy
Ranch Hand
Joined: Jun 13, 2000
Posts: 176
|
|
I am using oracle server. I am using this script inside JSP page It is a java code. Did you work in JSP before. <SCRIPT RUNAT="server"> public Connection doConnect(String connectString) { Connection dbconn = null; try { Class.forName ("oracle.jdbc.driver.OracleDriver"); //String url = "jdbc racle:thin:jaguar:1521:cbs"; System.out.println("I FOUND DRIVER FOR DATABASE"); } catch (java.lang.ClassNotFoundException ex) { System.err.print("classNotFoundException: "); System.err.println(ex.getMessage()); } // Attempt to get a connection to the JDBC data source indicated in the connectString argument try { dbconn = DriverManager.getConnection(connectString, "cbs", "oldprod"); } catch (SQLException ex) { System.err.println("SQLException: " + dbconn + ex.getMessage() ); System.out.println("something wrong with DriverManager"); } return dbconn; } // end doConnect()
|
 |
 |
|
|
subject: SQLException: The Network Adapter could not establish the connection?? what it means
|
|
|