spring c3po 连接mysql,sqlserver

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

 

 

posted @ 2013-08-20 11:41  lpshou  阅读(1722)  评论(0编辑  收藏  举报