473,397 Members | 2,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

ASP Vbscript Class Includes

Hi, I'm running into a problem with VBSCRIPT classes in ASP.

I use a seperate file for each class I use. Some of these class files
are included in multiple ASP scripts, but are also included in other
include files. So if you can't see the problem already, it is that
occasionally the class file will be included twice in the same script,
relsulting in the following error:

Microsoft VBScript compilation error '800a0411'

Name redefined

/includes/classes/closableobjectlist.asp, line 2

Class ClosableObjectList
------^

Does anyone know a clean solution for this problem?
Right now I am just having to be really careful with my includes, but
if there was a way I could protect against this, I believe it would be
a much more user friendly solution.

Thank You
Mike Biang
Senior Web Application Developer
Cramer Development
Jul 19 '05 #1
2 5361
Don't nest includes, as a general practice, and you should be okay. There
isn't a programming solution, only a programmer solution, and that is to do
things carefully!

Ray at work

"mike" <mb****@rockisu.com> wrote in message
news:8d**************************@posting.google.c om...
Hi, I'm running into a problem with VBSCRIPT classes in ASP.

I use a seperate file for each class I use. Some of these class files
are included in multiple ASP scripts, but are also included in other
include files. So if you can't see the problem already, it is that
occasionally the class file will be included twice in the same script,
relsulting in the following error:

Microsoft VBScript compilation error '800a0411'

Name redefined

/includes/classes/closableobjectlist.asp, line 2

Class ClosableObjectList
------^

Does anyone know a clean solution for this problem?
Right now I am just having to be really careful with my includes, but
if there was a way I could protect against this, I believe it would be
a much more user friendly solution.

Thank You
Mike Biang
Senior Web Application Developer
Cramer Development

Jul 19 '05 #2
On 11 Aug 2004 08:00:20 -0700, mb****@rockisu.com (mike) wrote:
Hi, I'm running into a problem with VBSCRIPT classes in ASP.

I use a seperate file for each class I use. Some of these class files
are included in multiple ASP scripts, but are also included in other
include files. So if you can't see the problem already, it is that
occasionally the class file will be included twice in the same script,
relsulting in the following error:

Microsoft VBScript compilation error '800a0411'

Name redefined

/includes/classes/closableobjectlist.asp, line 2

Class ClosableObjectList
------^

Does anyone know a clean solution for this problem?
Right now I am just having to be really careful with my includes, but
if there was a way I could protect against this, I believe it would be
a much more user friendly solution.

Thank You
Mike Biang
Senior Web Application Developer
Cramer Development


The safest way IMHO is to NOT include them in the included files and
put a note at the top of the included files that if the included file
is included into a asp file then you will also need file
clsMyClass.asp included as well.

Try and keep your include files as function/sub files (rather than
pure HTML (ie menu) code) then call the sub "displayMenu" from each
..ASP page.

HTH

Al.
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Tim Howarth | last post by:
I'm (very non expert) trying to use a snippet of VBScript (to shut down Windows workstations) converted to Python but have hit a problem. The VBScript below work fine; pc="MyPC" Set...
8
by: Dave Thomas | last post by:
I have developed a web site using asp pages that use both vbscript and javascript. Run the site on my PC and everything is fine. Ftp to my web hosting provider which hosts asp pages and look on my...
16
by: Mike Schinkel | last post by:
Does anyone know if there are bugs in VBScript's GetRef()? I'm using VBScript Version 5.6.8515 on Win2003Server w/ASP. Sometimes it returns an object that VarType() says is a vbObject. Other...
7
by: MyndPhlyp | last post by:
I am building up a library of Class'es that represent various columns of table layouts. One often used column is "name" and each occurrence is treated identically. (What a concept, eh?) Part of...
1
by: PaulieS | last post by:
Hi all. Am migrating a customer from IIS5 on W2K server to IIS6 on W2K3. Zipped all the websites and unzipped them to the identical locations on new server. Used IISMT to migrate metabase. ...
12
by: Jim Rodgers | last post by:
I have a big asp file that has an error under certain conditions -- totally repeatable. However, it only fails when I set response.buffer = True at the top. WHen I set it False in order to debug...
5
by: =?Utf-8?B?R1ROMTcwNzc3?= | last post by:
Hi Guys, It's been a while, I've got a small problem that I could do with your expertise on. As you know (I Think) I build websites for recruitment agencies, part of the website includes a job...
1
by: Igor Ladnik | last post by:
We are dealing with .NET server component and COM clients written with VB6 and VBScript. And there are some problems we faced (please see code below). 1. Managed type System Drawing.Color is...
3
by: nitewriter | last post by:
Hi, Can someone help me with this scripts, it works on a different server but gives me error now, This is the error I now get Microsoft VBScript runtime error '800a01f4' Variable is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.