1
請我創建其更新的用戶名和密碼更新SQL語句
我用這個代碼的網頁,但它不工作
String amdef ="model.firstAppModule";
String config="firstAppModuleLocal";
ApplicationModule ami = Configuration.createRootApplicationModule(amdef, config);
firstAppModuleImpl am = (firstAppModuleImpl)ami;
try{
String sql="UPDATE Employee SET Username='dddd',Password='ffff' WHERE Id=1";
Statement st = null;
st = am.getDBTransaction().createStatement(0);
st.executeUpdate(sql);
}
catch(Exception e) {
System.out.println("exception"+e.toString());
}
任何幫助,請