| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 713 人关注过本帖
标题:问高手有关数据库空值的问题!
取消只看楼主 加入收藏
sparrow
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2005-4-29
收藏
 问题点数:0 回复次数:0 
问高手有关数据库空值的问题!
我做的是一个二手房网站(我的毕业设计)。
当然涉及到二手房的发布,二手房有很多属性,如价格、面积、地址、朝向等等的。在数据库(sql2000)中我创建了一张对应房屋信息的表,且把所有的属性都允许为空。
但是用户发布时不一定会每项都全部填写。
问题一:是当用户发布的信息每项都填完时,才能在首页的分页显示中显示出来。
但当我有些属性值不填时(如:我不在朝向的下拉菜单中选择朝向),网页就会报错!
??????????????????????????????????????-
The server encountered an internal error () that prevented it from fulfilling this request.
org.apache.jasper.JasperException: [Microsoft][SQLServer 2000 Driver for JDBC]Underlying input stream returned zero bytes
  at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254)
  at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
  at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
  at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
  at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
  at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
  at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
  at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2422)
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
  at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
  at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
  at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:163)
  at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
  at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
  at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
  at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
  at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199)
  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
  at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:700)
  at org.apache.tomcat.(PoolTcpEndpoint.java:584)
  at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
  at java.lang.Thread.run(Thread.java:534)

root cause

javax.servlet.ServletException: [Microsoft][SQLServer 2000 Driver for JDBC]Underlying input stream returned zero bytes
  at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:536)
  at org.apache.jsp.index_jsp._jspService(index_jsp.java:482)
  at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
  at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
  at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
  at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
  at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
  at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
  at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
  at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2422)
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
  at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
  at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
  at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:163)
  at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
  at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
  at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
  at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
  at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199)
  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
  at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:700)
  at org.apache.tomcat.(PoolTcpEndpoint.java:584)
  at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
  at java.lang.Thread.run(Thread.java:534)

????????????????????????????????????????
请教高手我该怎么办?

问题二:我该用什么样的语句来实现房屋的组合查询功能?
如查询的下拉菜单有:地段:(一环,二环,三环) 朝向:(东、南、西、北)用途:(住房、写字楼、商房)等等。
搜索更多相关主题的帖子: 数据库 
2005-05-27 10:24
快速回复:问高手有关数据库空值的问题!
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.019595 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved