怎么让ASP页面显示SQL表的空记录?

来源:百度知道 编辑:UC知道 时间:2024/05/22 02:12:19
在做一个ASP页面,其中有调用SQL表的内容~
发现要是表的某列的值没填的时候,ASP页面就不能显示,应该怎么解决下那~?
就是不能显示原有网页,打不开网页那个样子~

HTTP 错误 500.100 - 内部服务器错误 - ASP 错误
Internet 信息服务

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

技术信息(用于支持人员)

错误类型:
Microsoft VBScript 运行时错误 (0x800A000D)
类型不匹配: 'htmlencode'
/COWA/Cowa.asp, 第 83 行

判断,如果为空的时候
if rs("字段")=null then
response.write " "
else
reponse.write rs("字段")
end if
还有你说的asp页面不能显示是指出错还是?

楼上的有点小问题,应该为:

if rs("字段")==null then
response.write " "
else
reponse.write rs("字段")
end if

if isnull(rs("字段")) then
response.write " "
else
reponse.write rs("字段")
end if

在调用数据是加上

where 字段 is not null

if rs.eof then
response.write"没有东西"
else
response.write rs("")
end if