日期:2014-05-18  浏览次数:20772 次

菜鸟求救!!各位大侠帮帮忙吧~~
小弟刚学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.aiyiweb.com/j2se/33144.html