首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

初学者求救!各位大侠帮帮忙吧~

2013-09-11 
菜鸟求救!!各位大侠帮帮忙吧~~小弟刚学jsp遇到奇怪的问题:下面的代码是想修改已经在数据库中的文章Stateme

菜鸟求救!!各位大侠帮帮忙吧~~
小弟刚学jsp遇到奇怪的问题:下面的代码是想修改已经在数据库中的文章
Statement   stmtup=conn.createStatement();
String   Sqlu= "updata   tArticle   set   fTitle= ' "+Title+ " ',fClassID= ' "+ClassID+ " ',fAuthor= ' "+Author+ " ',fCopyFrom= ' "+   CopyFrom+ " ',fKey= ' "+Key+ " ',fContent= ' "+Content+ " ',fIncludePic= ' "+   IncludePic+ " ',fDefaultPicUrl= ' "+DefaultPicUrl+ " ',fSavePicPathFileName= ' "+   SavePicPathFileName   + " '   where   fArticleID= "+ID;

int   upA=stmtup.executeUpdate(Sqlu);
        stmtup.close();
if   (upA> 0){
out.print( " <p   align= 'center '> 文章:[ "+   Title   + "]   修改成功 </p> ");
}
错误提示是:
org.apache.jasper.JasperException:   An   exception   occurred   processing   JSP   page   /www/Admin/Article_Update.jsp   at   line   96

93:   Statement   stmtup=conn.createStatement();
94:   String   Sqlu= "updata   tArticle   set   fTitle= ' "+Title+ " ',fClassID= ' "+ClassID+ " ',fAuthor= ' "+Author+ " ',fCopyFrom= ' "+   CopyFrom+ " ',fKey= ' "+Key+ " ',fContent= ' "+Content+ " ',fIncludePic= ' "+   IncludePic+ " ',fDefaultPicUrl= ' "+DefaultPicUrl+ " ',fSavePicPathFileName= ' "+   SavePicPathFileName   + " '   where   fArticleID= "+ID;
95:  
96:   int   upA=stmtup.executeUpdate(Sqlu);
97:           stmtup.close();
98:   if   (upA> 0){
99:   out.print( " <p   align= 'center '> 文章:[ "+   Title   + "]   修改成功 </p> ");

之前在修改文章栏目分类的时候用的几乎一样的代码,就没有问题,不知道这里哪错了,希望大侠指点。


[解决办法]
94: String Sqlu= "updata tArticle set
sql语句里的update写错了.
我的异常网推荐解决方案:An exception occurred processing JSP page,http://www.myexception.cn/j2se/33144.html

热点排行