String strurl="jdbc:odbc:driver={Microsoft Access Driver (*.mdb)};DBQ=D:/student.mdb";
Connection conn=DriverManager.getConnection(strurl);
Statement stmt = conn.createStatement();
if (user.equals("")|| pass.equals(""))
JOptionPane.showMessageDialog(null, "用户名或密码不能为空", "警告",JOptionPane.WARNING_MESSAGE);
else
{
ResultSet rs = stmt.executeQuery("select * from admin where username='" + user + "' AND password='" + pass + "'");
if (rs.next())
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请
点击举报。