package hu;
import java.sql.*;
public class Sql_jdbc {
public static void fw(String num) {
String driverName = "com.microsoft.sqlserver.jdbc.SQLServerDriver"; //加载JDBC驱动 ,我用的是SQL server数据库
String dbURL = "jdbc:sqlserver://localhost:1433;DatabaseName=xxx"; //连接服务器和数据库test,xxx表示你的建的数据库名
String userName = "hu"; //默认用户名,我的,你的你自己知道吗
String userPwd = "123"; //密码,我的,你设置的你自己知道的
Connection con=null;
Statement stmt=null;
ResultSet rs=null;
try {
Class.forName(driverName);