Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

network adapter error while connection (help urgent)

 
felix thomas
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i am getting the error whille runing the below code
Exception in thread "main" java.sql.SQLException: The Network Adapter could not
establish the connection
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
va)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at dbAccess.main(dbAccess.java:7)
import java.sql.*;
class dbAccess {
public static void main (String args []) throws SQLException
{
DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
Connection conn = DriverManager.getConnection
("jdbc racle:thin:@felix:2481 rcl", "scott", "tiger");
// @machineName ort:SID, userid, password
Statement stmt = conn.createStatement();
ResultSet rset = stmt.executeQuery("select BANNER from SYS.V_$VERSION");
while (rset.next())
System.out.println (rset.getString(1)); // Print col 1
stmt.close();
}
}

my operating system is windows98 amd oracle 8.1.5
how can i know the SID of a oracle database.have not used the correct SID of the database.
it is loading the driver only while connection does it says this error i think
Please help
 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
search this forum for "Network Adapter" and you'll find many answers to your problem. Let us know if that didn't work
Jamie
 
felix thomas
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i went through all similiar postings but no solutions provided.Please help
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic