1  连接mysql

  (1) http://wenku.it168.com/d_000096351.shtml 

 

2  连接sqlserver 

 

(1)http://blog.csdn.net/vinep/article/details/3468159

(2)http://lwx522.iteye.com/blog/1236333 

 

(3)连接到sqlserver2000与sqlserver2005驱动有区别:

 

如果你以前用JDBC连接SQL Server 2000的话就要注意了:

在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";

如果写法错误将会找不到驱动

http://developer.51cto.com/art/200907/134635.htm

 

 

相关文章:

  • 2022-01-07
  • 2021-07-25
  • 2021-12-08
  • 2021-11-28
  • 2021-07-04
  • 2022-12-23
  • 2021-10-23
  • 2021-05-25
猜你喜欢
  • 2022-12-23
  • 2022-01-08
  • 2021-09-30
  • 2022-03-08
  • 2021-05-20
  • 2022-12-23
相关资源
相似解决方案