手机
当前位置:查字典教程网 >编程开发 >ASP教程 >asp提示无效使用 Null: Replace
asp提示无效使用 Null: Replace
摘要:使用REPLACE来将数据库里读出来的数据替换,如果字段不为空是正常,但如果为空时就出现以下提示:MicrosoftVBScript运行时错...

使用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),"<br/>")
end if

测试:

代码如下:

【asp提示无效使用 Null: Replace】相关文章:

ASP中DateAdd函数日期使用

asp html转成html编码程序

ASP常用函数:ReplaceHTML

用ASP实现hashMap功能的类

ASP AspUpload上传文件示例代码

使用ASP中的VB ActiveX.dll文件

asp 删除图片与文件函数

javascript asp教程第九课--cookies

asp组件编写准备工作

一些值得一看的代码asp

精品推荐
分类导航