天使漫步IT工作室天使漫步IT工作室

java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver解决办法


Warning: count(): Parameter must be an array or an object that implements Countable in /www/wwwroot/u11u.com/usr/themes/wq/functions.php on line 110

Warning: count(): Parameter must be an array or an object that implements Countable in /www/wwwroot/u11u.com/usr/themes/wq/functions.php on line 116

在SQL Server 2000 中加载驱动和URL路径的语句是:

String driverName = "com.microsoft.jdbc.sqlserver.SQLServerDriver";
String dbURL = "jdbc:microsoft:sqlserver://localhost:1433; DatabaseName=sample";

而SQL Server 2005 中加载驱动和url的语句则为:

String driverName = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
String dbURL = "jdbc:sqlserver://localhost:1433; DatabaseName=sample";

可以看出版本不同连接方法也是不同的。SQL Server有许多不同版本,看你用的是哪个了。

ps:注意这两个链接语句的异同点!

本站原创,欢迎转载,转载敬请标明出处:天使漫步IT工作室 » java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver解决办法
添加新评论


Warning: Use of undefined constant php - assumed 'php' (this will throw an Error in a future version of PHP) in /www/wwwroot/u11u.com/usr/themes/wq/comments.php on line 38