数码资讯
JSP连接SQLServer2008连接不符合解决方案
1,首先,如果你遇到javax.servlet.servletexception错误:java.lang.classnotfoundexception:com.microsoft.jdbc.sqlserver.sqlserverdriver, 所以你应该觉得Class.forName(COM。微软。
选购提示
关注价格、性能、续航、售后和真实使用场景,理性比较后再下单。
1,首先,如果你遇到javax.servlet.servletexception错误:java.lang.classnotfoundexception:com.microsoft.jdbc.sqlserver.sqlserverdriver,
所以你应该觉得Class.forName(COM。微软。JDBC。SQLServer。sqlserverdriver );
改变Class.forName(COM。微软。SQLServer JDBC。sqlserverdriver );
2,当误差报的错是难道是没有合适的驱动程序发现JDBC:微软:: / /本地SQLServer 1034数据库= test2。
字符串URL =JDBC:微软SQLServer: / /:本地:1034;DatabaseName& = test2应采取。
更改字符串URL =JDBC: / /本地SQLServer::1034;DatabaseName& = test2 ;
3、错误报的错是COM。微软。SQLServer JDBC。sqlserverexception:,无法打开请求的登录数据库,个的登录失败。
解决这个问题的方法有很多,比如检查驱动、用户权限等。I repeatedly create users and set permissions, and have not been able to succeed.Finally, I went to the configuration manager to check the dynamic port of TCP/IP's IPALL in the network configuration, and found that he was not the usual 1433, but 1034, and then changed it in the code.In addition, the user rights in SQL server should be paid attention to, otherwise it is easy to get the problem
所以你应该觉得Class.forName(COM。微软。JDBC。SQLServer。sqlserverdriver );
改变Class.forName(COM。微软。SQLServer JDBC。sqlserverdriver );
2,当误差报的错是难道是没有合适的驱动程序发现JDBC:微软:: / /本地SQLServer 1034数据库= test2。
字符串URL =JDBC:微软SQLServer: / /:本地:1034;DatabaseName& = test2应采取。
更改字符串URL =JDBC: / /本地SQLServer::1034;DatabaseName& = test2 ;
3、错误报的错是COM。微软。SQLServer JDBC。sqlserverexception:,无法打开请求的登录数据库,个的登录失败。
解决这个问题的方法有很多,比如检查驱动、用户权限等。I repeatedly create users and set permissions, and have not been able to succeed.Finally, I went to the configuration manager to check the dynamic port of TCP/IP's IPALL in the network configuration, and found that he was not the usual 1433, but 1034, and then changed it in the code.In addition, the user rights in SQL server should be paid attention to, otherwise it is easy to get the problem
声明:本文内容用于数码产品信息整理与选购参考,具体价格、库存、售后政策以官方渠道和电商页面实时信息为准。