VBScript returns an error "Name is redefined"

I have a notification window, and if I am currently in the test database, I want the notification window to have a different text compared to the current database.

So I declared a variable with a name isTestDband set a value for it True, but I keep getting this annoying error:

Microsoft VBScript compilation error '800a0411'

Name redefined

myfiles/conn_open.asp, line 12

Dim isTestDb
----^

Here is my simple code that is in inclusion at a much higher level than where I do my conditional check, I assume this is not a problem.

Dim isTestDb

isTestDb = True


-- Much Later in another file somehwere

If isTestDb Then
    Response.Write("<h1>It is set to True</h1>")
    Response.End
Else
    Response.Write("<h1>It is set to False</h1>")
    Response.End
End If

I checked all my working directories, and I’m sure that the variable is not set somewhere else with the same name, I even tried different names for the variable and got exactly the same error.

+4
source share
4

, , Dim isTestDb, !:/

+2

, isTestDb .

+4

, .asp, :

<!--#include file="myFile.asp">

,

+4

, , include.

: a.asp x.asp. :

<!--#include file="a.asp">
<!--#include file="x.asp">
0

All Articles