This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Connection refused using datadirect jdbc

 
Graham Thorpe
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi every body

when i try this code the foloowing error is showing"connection refused the specified SID
<ORCL> was not recognised by the oracle server"
import java.sql.*;
import java.util.*;
import java.io.*;
public class connect
{

public static void main(String args[])
{
try
{
new connect().load();
}catch(Exception e)
{
System.out.println("Exception e:"+e);
}


}
public void load() throws Exception
{
try
{
Class.forName("com.ddtek.jdbc.oracle.OracleDriver");
Connection con=DriverManager.getConnection("jdbc atadirect racle://SUBRA:1521");

}
catch(ClassNotFoundException e)
{
System.out.println("e:"+e);
}catch(SQLException e){
System.out.println(e.getMessage());
}catch(Exception e){
System.out.println(e.getMessage());
}

}
}
 
Dave Vick
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
glkrrr
I asked you read our naming policy yesterday. Please do so now and change you display name. Or we'll be forced to lock your account and you'll have to reregister completely.
Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic