??求修改用户密码代码 可以告诉我修改用户密码的代码是怎样写的吗 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 try{ String strurl="jdbc:odbc:driver={Microsoft Access Driver (*.mdb)};DBQ=D:\\SQL\\db.mdb";//你的ACCESS文件位置 Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection conn=DriverManager.getConnection(strurl); Statement stmt = conn.createStatement(); String strSQL = "Update User set password='11' where ID='1'"; //User是用户表名,password是密码字段名 stmt.executeUpdate(strSQL); conn.close(); } catch(Exception e) { System.out.println("连接失败!"); e.printStackTrace(); } Class.forName("net.sourceforge.jtds.jdbc.Driver");con=DriverManager.getConnection("jdbc:jtds:sqlserver://localhost:1433/数据库名","user","pwd");con.prepareStatement("update 表名 set pwd=? where name=?");con.setString(1,"新的密码");con.setString(2,"用户名");con.executeUpdate(); 也是做课设吧。做个界面,把输入框里的值拿出来。连上sql数据库,用个update语句就可以实现了。最好是自己想想,其实不难的。如果实现没办法。我可以给你发源码。 JDialog监听器问题 如何学习网络通信协议 extjs grid 从后台取数据问题,来者有分 swt中窗体获得焦点的方法 Jtable更新问题.高手请进 assert功能 详细设计伪代码怎么写,那个高手帮个忙,根据这个方法把它的伪代码写出来,万分感谢 急:请各位高手指点? Thank you!!! 求助,如何做Splash启动页面(象JBuilder启动时) 请教:AOL的邮件格式 帮我写个JAVA程序。跪谢了 问一个Iterator接口的问题
String strurl="jdbc:odbc:driver={Microsoft Access Driver (*.mdb)};DBQ=D:\\SQL\\db.mdb";//你的ACCESS文件位置
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn=DriverManager.getConnection(strurl);
Statement stmt = conn.createStatement();
String strSQL = "Update User set password='11' where ID='1'"; //User是用户表名,password是密码字段名
stmt.executeUpdate(strSQL);
conn.close();
}
catch(Exception e)
{
System.out.println("连接失败!");
e.printStackTrace();
}
con=DriverManager.getConnection("jdbc:jtds:sqlserver://localhost:1433/数据库名","user","pwd");
con.prepareStatement("update 表名 set pwd=? where name=?");
con.setString(1,"新的密码");
con.setString(2,"用户名");
con.executeUpdate();
做个界面,把输入框里的值拿出来。
连上sql数据库,用个update语句就可以实现了。最好是自己想想,其实不难的。
如果实现没办法。我可以给你发源码。