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

这是咋回事?????
在下初学jsp,大家帮帮忙~~
代码:
Statement   stmtup=conn.createStatement();
String   Sqlu= "update   tArticle   set   fTitle= ' "+Title+ " ',fClassID= ' "+ClassID+ " ',fAuthor= ' "+Author+ " ',fCopyFrom= ' "+   CopyFrom+ " ',fKey= ' "+Key+ " ',fContent= ' "+Content+ " ',fIncludePic= ' "+   IncludePic+ " ',fDefaultPicUrl= ' "+DefaultPicUrl+ " ',fSavePicPathFileName= ' "+   SavePicPathFileName   + " '   where   fArticleID= "+ID;

int   gai   =   stmtup.executeUpdate(Sqlu);
if   (gai> 0)
{
out.print( " <p   align= 'center '> 文章修更改成功 </p> ");
}
错误提示:
HTTP   Status   500   -  

--------------------------------------------

type   Exception   report

message  

description   The   server   encountered   an   internal   error   ()   that   prevented   it   from   fulfilling   this   request.

exception  

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= "update   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:   double   gai   =   stmtup.executeUpdate(Sqlu);
97:   if   (gai> 0)
98:   {
99:   out.print( " <p   align= 'center '> 文章修更改成功 </p> ");


Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:524)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:417)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


root   cause  

javax.servlet.ServletException:   java.sql.SQLException:   [Microsoft][ODBC   Microsoft   Access   Driver]   标准表达式中数据类型不匹配。
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:850)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
org.apache.jsp.www.Admin.Article_005fUpdate_jsp._jspService(Article_005fUpdate_jsp.java:358)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
or