Class.forName(
"com.microsoft.sqlserver.jdbc.SQLServerDriver")
.newInstance();
String url = "jdbc:sqlserver://IP:1433;databaseName=数据库名";
Connection conn = DriverManager.getConnection(url, "登陆用户名",
"登陆密码");
Statement stmt = conn.createStatement(
ResultSet.TYPE_SCROLL_SENSITIVE,
ResultSet.CONCUR_UPDATABLE);
String sql = "select * from t_userdb where gh='" + yh + "'"
+ "and jgbm='" + mm + "'";
//out.println(sql);
ResultSet rs = stmt.executeQuery(sql);