深入JDBC sqlserver连接写法的详解
编程学习 2021-07-05 15:27www.dzhlxh.cn编程入门
本篇文章是对JDBC sqlserver的连接写法进行了详细的分析介绍,需要的朋友参考下
SQL Server 2000
String driverName = "com.microsoft.jdbc.sqlserver.SQLServerDriver";
String dbURL = "jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=sample";
SQL Server 2005和SQL Server 2008
String driverName = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
String dbURL = "jdbc:sqlserver://localhost:1433; DatabaseName=sample";
代码如下:
String driverName = "com.microsoft.jdbc.sqlserver.SQLServerDriver";
String dbURL = "jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=sample";
SQL Server 2005和SQL Server 2008
代码如下:
String driverName = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
String dbURL = "jdbc:sqlserver://localhost:1433; DatabaseName=sample";