当前位置: 代码迷 >> Java Web开发 >> 初学者求救!各位大侠帮帮忙吧~
  详细解决方案

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

热度:163   发布时间:2016-04-17 13:36:34.0
菜鸟求救!!各位大侠帮帮忙吧~~
小弟刚学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.daimami.com/search?q=33144
  相关解决方案