从access数据库读出信息显示,同时处理空格和回车,出现错误:
Microsoft VBScript 运行时错误 错误 '800a005e'
无法解决,紧急求教。
---------------------------------------------------------------
是非法使用 Null,我以前也见过,好好看看代码!!
---------------------------------------------------------------
800a005e:无效使用Null
你的replace源串是不是可能为Null阿?
---------------------------------------------------------------
94 800A005E 非法使用 Null
http://expert.csdn.net/Expert/topic/1458/1458497.xml?temp=.6275904
我的帖里面都有
---------------------------------------------------------------
再使用replace之类的处理函数之前应该有一个是否为空的判断
if IsNull(str) or IsEmpty(str) or str="" then
str="nothing"
end if
---------------------------------------------------------------
还提示错误?
---------------------------------------------------------------
function my_newline(str)
if str<>"" then
my_newline=replace(str,chr(13)&chr(10),"
1<br/>
")
my_newline=replace(my_newline,chr(32)," ")
my_newline=replace(my_newline,chr(9)," ")
else
my_newline=" "
end if
end function
rs.open sql,cn,1,1
str=rs("xxx")
rs.close()
response.write my_newline(str)