Python语言技术文档

微信小程序技术文档

php语言技术文档

jsp语言技术文档

asp语言技术文档

C#/.NET语言技术文档

html5/css技术文档

javascript

点击排行

您现在的位置:首页 > 技术文档 > asp技巧

asp提示无效使用_Null__Replace

来源:中文源码网    浏览:168 次    日期:2024-03-26 11:27:06
【下载文档:  asp提示无效使用_Null__Replace.txt 】


asp提示无效使用 Null: Replace
使用REPLACE来将数据库里读出来的数据替换,如果字段不为空是正常,但如果
为空时就出现以下提示:
Microsoft VBScript 运行时错误 错误 '800a005e'
无效使用 Null: 'Replace'
主要问题就是sqlserver的字段为null,所以不能简单的为空判断,只能使用isnull
可以先判断
if isnull(rs("coutent"))=false then
response.write("null")
else
response.write replace(rs("coutent"),chr(13),"
")
end if
测试:
复制代码 代码如下:
if isnull(keyword)=true then keyword=dxy_title
if isnull(descriptions)=true then descriptions=dxy_title

相关内容