我正在使用sql server 2008和jtds驱动程序来建立sql server和jsp应用程序之间的连接.我使用的代码是
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); }
java.sql.sqlException: Network error IOException: Connection refused: connect