| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 584 人关注过本帖
标题:数据库更新问题
取消只看楼主 加入收藏
glorysea
Rank: 1
等 级:新手上路
帖 子:18
专家分:0
注 册:2007-10-27
收藏
 问题点数:0 回复次数:0 
数据库更新问题

请各位大哥帮帮忙吧,写了一段对数据库的更新代码,代码如下:
<%
String user=request.getParameter("username");
Class.forName(strDBDriver).newInstance();

conn=DriverManager.getConnection(strDBURL,strDBUser,"");

address=new String(address.getBytes("iso-8859-1"),"gb2312");

prepareStmt=conn.prepareStatement("update rights set password=?, email=?,address=? where username='"+user+"'");
String passwd=request.getParameter("password");
prepareStmt.setString(1,"%"+passwd+"%");
String email=request.getParameter("email");
prepareStmt.setString(2,"%"+email+"%");
String address=request.getParameter("address");
prepareStmt.setString(3,"%"+address+"%");
prepareStmt.executeUpdate();
为何老出现这些错误:
org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 9 in the jsp file: /modi.jsp
Generated servlet error:
PrepareStatement cannot be resolved to a type

An error occurred at line: 11 in the jsp file: /modi.jsp
Generated servlet error:
address cannot be resolved

An error occurred at line: 11 in the jsp file: /modi.jsp
Generated servlet error:
address cannot be resolved

An error occurred at line: 11 in the jsp file: /modi.jsp
Generated servlet error:
prepareStmt cannot be resolved

An error occurred at line: 11 in the jsp file: /modi.jsp
Generated servlet error:
prepareStmt cannot be resolved

An error occurred at line: 11 in the jsp file: /modi.jsp
Generated servlet error:
prepareStmt cannot be resolved

An error occurred at line: 11 in the jsp file: /modi.jsp
Generated servlet error:
prepareStmt cannot be resolved

An error occurred at line: 11 in the jsp file: /modi.jsp
Generated servlet error:
prepareStmt cannot be resolved

An error occurred at line: 11 in the jsp file: /modi.jsp
Generated servlet error:
prepareStmt cannot be resolved


搜索更多相关主题的帖子: 数据库 
2007-11-05 09:31
快速回复:数据库更新问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.029156 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved