发布网友
共3个回答
热心网友
String driver = "com.microsoft.jdbc.sqlserver.SQLServerDriver";
String url = "jdbc:microsoft:sqlserver://localhost:1247;DatabaseName=pizza";
String username = "name";
String password = "pwd";
Class.forName(driver);
Connection conn= DriverManager.getConnection(url,username,password);
热心网友
建议使用SQL Server身份验证,windows身份验证没用过。
热心网友
你SQLSERVER服务有没有开啊