马克沁真能震死人吗:高手帮忙 jsp和数据库的问题

来源:百度文库 编辑:高考问答 时间:2024/04/29 02:19:07
下面是出错的提示 请教了
javax.servlet.ServletException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]列 'download.id' 在选择列表中无效,因为该列未包含在聚合函数中,并且没有 GROUP BY 子句。
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
org.apache.jsp.search_jsp._jspService(search_jsp.java:529)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

SQL语句写错了,你可以尝试把SQL语句打印出来,然后在查询分析器里运行,确认没错后,在写入JSP。

把数据库联接字符串 和 SQL文发来看看阿~~~问题在那里面