java连接ms sql server的问题
2000的版本,打了sp4的补丁,安了三个jdbc驱动程序,
连接代码:
import java.sql.*;
public class TestDB {
public static void main(String[] args) {
String driverName = "com.microsoft.jdbc.sqlserver.SQLServerDriver ";
String dbURL = "jdbc:microsoft:sqlserver://localhost:1433; DatabaseName=pubs ";
String userName = "sa ";
String userPwd = " ";
try {
Class.forName(driverName);
Connection dbConn = DriverManager.getConnection(dbURL, userName, userPwd);
System.out.println( "Connection Successful! ");
dbConn.close();
&n