This article mainly introduces the use of Null: Replace when asp prompts are invalid. Friends in need can refer to it.
Use REPLACE to replace the data read from the database. It is normal if the field is not empty, but if
When it is empty, the following prompt appears:
Microsoft VBScript runtime error error '800a005e'
Invalid use Null: 'Replace'
The main problem is that the field of sqlserver is null, so you cannot simply judge if it is null, you can only use isnull.
You can judge first
if isnull(rs(coutent))=false then
response.write(null)
else
response.write replace(rs(coutent),chr(13),<br/>)
end if
test:
Copy the code code as follows:if isnull(keyword)=true then keyword=dxy_title
if isnull(descriptions)=true then descriptions=dxy_title