本地服务在控制面板的服务里可以看到并启动,但就是连接不上,救命~~~~
url= jdbc:microsoft:sqlserver://localhost:1433/LL
用户名和密码正确,在JBX里总是报如下错误:
SQLException : [Microsoft][SQLServer JDBC Driver]Unable to connect. Invalid URL.
引入了
msbase.jar mssqlserver.jar,msutil.jar,JAVA连接代码如下:
String url = "jdbc:microsoft:sqlserver://localhost:1433/LL ";
System.out.println( "url= " + url);
String userName = "sa ";
String password = "790411 ";
Connection conn = null;
try {
Class.forName(dbDriver).newInstance();
conn = DriverManager.getConnection(url, userName, password);
System.out.println( "$$$$$$$$$$$$$$$$$$$ mmmmmmmmm " + conn.hashCode());
conn.setAutoCommit(true);
}
catch (SQLException e) {
System.out.println( "SQLException : "+e.getMessage());
}
catch (IllegalAccessException ex) {
System.out.println( "IllegalAccessException: "+ex.getMessage());
}
catch (InstantiationException ex) {
System.out.println( "InstantiationExcepiton : "+ex.getMessage());
}
catch (ClassNotFoundException ex) {
System.out.println( "ClassNotFoundException : "+ex.getMessage());
}
用JBX的DATABASE PILOT去连接LL提示 "com.borland.dx.dataset.DataSetException: [Microsoft][SQLServer JDBC Driver]Error establishing socket.
"
本地服务LL在控制面板的服务里可以看到并可以正常启动,但在企业管理器里新建注册连接不上,
我重装过本机的SQLSERVER2000 PERSONAL,请教为什么,该怎么解决?
------解决方案--------------------关闭防火墙
打上SQL 2000的最新补丁
------解决方案--------------------关闭防火墙,添加1433端口,数据库打上最新补丁!