asp提示无效使用 Null: Replace
使用REPLACE来将数据库里读出来的数据替换,如果字段不为空是正常,但如果
为空时就出现以下提示:
MicrosoftVBScript运行时错误错误'800a005e'
无效使用Null:'Replace'
主要问题就是sqlserver的字段为null,所以不能简单的为空判断,只能使用isnull
可以先判断
ifisnull(rs("coutent"))=falsethen
response.write("null")
else
response.writereplace(rs("coutent"),chr(13),"<br/>")
endif
测试:
ifisnull(keyword)=truethenkeyword=dxy_title ifisnull(descriptions)=truethendescriptions=dxy_title
热门推荐
1 训练狗狗憋尿
2 狗狗追踪训练
3 狗狗训练要多少钱
5 深圳狗狗训练
6 训练狗狗唤回
7 狗狗叫怎么训练
8 狗狗训练班
10 狗狗社会化训练
11 狗狗叫回训练
12 广州狗狗训练学校
13 狗狗训练躺下
14 狗狗随行训练
15 训练狗狗巡回
16 狗狗要怎么训练
17 狗狗喂食训练
18 训练狗狗躺下