Results 1 to 5 of 5

Thread: Name redifined error

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2000
    Location
    Sudbury, Ontario, Canada
    Posts
    274
    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,


  2. #2
    Guest
    It means that you've put
    Code:
    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.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2000
    Location
    Sudbury, Ontario, Canada
    Posts
    274
    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.

  4. #4
    Guest
    You don't need variables unique to each include file - just make sure you only declare them once.

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2000
    Location
    Sudbury, Ontario, Canada
    Posts
    274
    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.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width