I am using sql server 2008 and jtds driver to establish a connection between sql server and the jsp application. I code i used is
java.sql.SQLException: Network error IOException: Connection refused: connect
String url= "jdbc:jtds:sqlserver://127.0.0.1/sfts";
String id= "sfts";
String pass = "sfts";
try{
Class.forName("net.sourceforge.jtds.jdbc.Driver");
con = java.sql.DriverManager.getConnection(url, id, pass);
}catch(Exception e){
out.println(e);
}
While running this code, it showing error as
java.sql.SQLException: Network error IOException: Connection refused: connect
TCP/IP was set enabled and port number was set to 1433. But still it is showing this error.. What to do now??