eclipse连接mssql2005没反应
版本:最新版的eclipseforjavaee HELIOS 数据库:mssql2005 驱动包:sqljdbc4.jar
代码如下try { //添加了相应的驱动包,以及引入了java.sql.*
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
Connection ct = DriverManager.getConnection("jdbc:sqlserver://localhost:1433;DatabaseName=test","sa","123456");
Statement st = ct.createStatement();
System.out.println("ok");
} catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
} //但是程序是一直运行状态,也没有任何提示信息
但是复制同样的代码 在myeclipse中就可以运行成功 输出"OK" 换了数据库mssql2008也不行 还是一样停留不动
但是我用mysql在eclipse上就运行成功 请问是怎么回事呀?jdbc:sqlserver://localhost:1433;databaseName=test;integratedSecurity=true; 这段代码是什么意思啊?我记得好像有次提示是无法完成身份验证,请问要怎么解决呢?