Connection con;
Statement stmt;
ResultSet rs;
String driver;
String url;
String user;
String pwd;
driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
url = "jdbc:sqlserver://localhost:1433;databaseName=你的数据库名";
user = "用户名";
pwd = "密码";
Class.forName(driver);
System.out.println("driver is ok");
con = DriverManager.getConnection(url,user,pwd);
汉字改一下就好……
sqlconnection con=new sqlconnection("server=.;database=shoppingdb;uid=sa;pwd=)
server=baixin
你SQL是这名称吗?