關於無效使用 Null: 'Replace'

使用REPLACE來將數據庫裏讀出來的數據替換,如果字段不爲空是正常,但如果
爲空時就出現以下提示:
Microsoft VBScript 運行時錯誤 錯誤 '800a005e' 
無效使用 Null: 'Replace' 

可以先判斷
if isnull(rs("coutent"))=false then
response.write("null") 
else
response.write replace(rs("coutent"),chr(13),"<br/>")
end if

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章