JSP中,数据更新(UPDATE)的奇怪问题!!!怪!!!!!!!!!!!1 看看sql语句有错没??可以单独执行一下看看。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我把执行后的SQL语句打印出来放在查询分析器中执行了,都没有问题呀!所以怪!我觉得问题在JSP上,但,我看不出哪有毛病!!快,帮我呀,真急人 try{Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");String url="jdbc:odbc:cpic";Connection con=DriverManager.getConnection(url,"sa",""); PreparedStatement updateacc;String strSQL="UPDATE userinfo SET passw=? where usern='"+usern+"'"; updateacc = con.prepareStatement(strSQL); updateacc.setString(1, pass); updateacc.executeUpdate(); response.sendRedirect("usercharge.jsp");con.close(); }catch(Exception e) {out.println(e);}稍微改一下吧 我用过tomcat下出现这样的情况,记录更新了,但是有延迟,会卡主!然后关掉服务就执行了。 有没有办法把Java Application加入到页面中? 如何实现显示完提示信息后几秒钟后自动隐藏?? 關於JavaMail與EXCHANGE郵件服務器設定的問題 本地运行jsp网站 在tomcat工程停止时运行一个servlet 我给天然气公司做的网站作品,大家看看,给点意见. java 连接数问题,一直很迷惑,用的mysql数据库 apache的配置问题 请问:用JBuilder生成的exe文件,在没有java环境的机器上可以执行吗? 360浏览器java导出excel时,请求2次,且第二次表单为空,如何解决? 急!!! 标签库的问题
所以怪!
我觉得问题在JSP上,但,我看不出哪有毛病!!
快,帮我呀,真急人
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String url="jdbc:odbc:cpic";
Connection con=DriverManager.getConnection(url,"sa","");
PreparedStatement updateacc;
String strSQL="UPDATE userinfo SET passw=? where usern='"+usern+"'";
updateacc = con.prepareStatement(strSQL);
updateacc.setString(1, pass);
updateacc.executeUpdate();
response.sendRedirect("usercharge.jsp");
con.close();
}catch(Exception e)
{out.println(e);}
稍微改一下吧