I have made a small program that will connect to the oracle db. I also added catch blocks to find out when something goes wrong. This is the code block: DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()); String url = "jdbc racle:thin:10.0.0.2:1433"; String username = "user"; String password = "password"; DriverManager.getConnection(url,username,password); This is the error: SQLException SQLState: null Message: Io exception: The Network Adapter could not establish the connection Vendor:17002 when i try the same code with the sqlserver (of course i changed the first line to Class.forName(com.ms.jdbc.sql....), the url, username and password), it works just fine. Can anyone tell me what is wrong with the code above? What can i do to remove the error?
String url = "jdbc: oracle:firstname.lastname@example.org:1433:<SID>; I hope this helps Nigel [ February 14, 2002: Message edited by: Nigel Browne ] [ February 14, 2002: Message edited by: Nigel Browne ]
Joined: Feb 10, 2002
I made the code changes but this next problem came out: SQLException: SQLState: null Message: Invalid Oracle URL Vendor: 17067 I am sure that the IP address and the port number i used are correct because i telnet to them all the time (and i rechecked them to make sure i did not do any typo error). Thanks in advance.