PDA

Click to See Complete Forum and Search --> : Name redifined error


dcarlson
Aug 16th, 2000, 09:46 AM
I'm getting this error:


Microsoft VBScript compilation error '800a0411'

Name redefined

/WebOpenClose_Local/ocscripts/list_office.asp, line 3

dim myDSN, mySQL
----^

What does this mean and how do I get rid of it?

Thanks,

Aug 16th, 2000, 10:24 AM
It means that you've put
Dim myDSN

'Then a little further down the page:

Dim myDSN ' again!!

if you can find it Dimmed twice, then there's your problem...if not check that you haven't redimmed in another file that you're including with SSI. When you do this both files become one (to the asp parser) and even if each Dim statement is in a different file they will effectively both be in the same one.

dcarlson
Aug 16th, 2000, 02:55 PM
I eventually found the problem, what a piece of crap. For every include file you have to create unique variables.

Thanks for the reply though.

Aug 17th, 2000, 05:48 PM
You don't need variables unique to each include file - just make sure you only declare them once.

dcarlson
Aug 18th, 2000, 08:17 AM
What happened was I had a page with myDSN and mySQL as a variables and then included another ASP file which also had myDSN and mySQL as variables. On both pages I had Option Explicit declared. Thus giving me the error. I think that's what happened, I can't really remember.