classic ASP error '80020009' Exception occurred

asp-classic, exception

Solution

This probably means that the field in the database is Null. You could add this line before the problematic line:

If isNull( myString ) Then Exit Function

In case that doesn't work, you could also try changing the problematic line into this:

If "" & myString <> "" Then

Problem

On line 5 of the code to a site I am fixing, I get an exception error from classic ASP. The ** line below is line 5. It looks like this function is used on other pages in the site, although I'm not quite sure why. I've tried just removing the code, but since it's used other places, it must be important, so maybe I shouldn't try removing it.... ``` Private Function AE(myString) **If myString <> "" then** AE = Replace(myString,"`","'") End If End Function ``` Here is an example of where `AE` is used: `response.write AE(rs("ArticleTitle"))` Thanks in advance for any help you can give me!

Original source