473,698 Members | 2,166 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error with option explicit

Hi All!

I have the following in a vb script:

option explicit
Response.Expire s = -1
Server.ScriptTi meout = 600

The script gets imported in the following way:
<script language="VBscr ipt" runat=server src="lib/upload/aspUpload.asp">
</script>

I get the following error:

Error Type:
Microsoft VBScript compilation (0x800A0400)
Expected statement
/RobertMarkBram/lib/upload/aspUpload.asp, line 10
option explicit
I do *not* have this in my script:
<%@ LANGUAGE=VBSCRI PT EnableSessionSt ate=False %>
<%
Option Explicit
%>

Because the script is an external vb library.. (I use JavaScript on the same
page).

Can anyone suggest how I can get option explicit in there?

Thanks for any advice!

Rob
:)
Jul 19 '05 #1
1 2514
Robert Mark Bram wrote:
Hi All!

I have the following in a vb script:

option explicit
Response.Expire s = -1
Server.ScriptTi meout = 600

The script gets imported in the following way:
<script language="VBscr ipt" runat=server
src="lib/upload/aspUpload.asp"> </script>

I get the following error:

Error Type:
Microsoft VBScript compilation (0x800A0400)
Expected statement
/RobertMarkBram/lib/upload/aspUpload.asp, line 10
option explicit
I do *not* have this in my script:
<%@ LANGUAGE=VBSCRI PT EnableSessionSt ate=False %>
irrelevant
<%
Option Explicit


Are you sure?

"Option Explicit" can only be used one in a page. If it appears in an
included file, it cannot appear in other included files, nor in the "host"
page.

Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 19 '05 #2

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

Similar topics

8
12235
by: biro man | last post by:
I have a dynamic database driven page that I have been working on and tweaking etc until I have got it to work pretty much the way I want it to. I also have a defined website. I wish to include the new dbase page in the exisiting website and keep the "feel" of the exisiting website. So I thought the easiest way to do this wasy to use the template that I had created for the existing site and then just *include* the .asp pages. ...
7
2707
by: Steve Jorgensen | last post by:
Here is some code to generate code for raising and getting information about custom errors in an application. Executing the GenerateXyzErrDefs procedure generates the code. <tblXyzError> ErrorCodeOffset (Long Int) ErrorObjBaseName (Text(50)) ErrorDescription (Text(255)) 1 DontDoThat Hey! Don't do that!
12
2074
by: Doug Hill | last post by:
Please, Microsoft, update Option Explicit Option Strict barks at late binding. We love late binding. So Option Strict flags too many things. Option Explicit is misleading. It allows Dim LastName rather than forcing
2
1520
by: Jessica Sterner via .NET 247 | last post by:
I keep getting the error message: An unhandled exception of type 'System.NullReferenceException' occurred in Final2.exe Additional information: Object reference not set to an instance of an object. I am new to programming and am not sure what is wrong. I feel like I have tried everything. Any advice would be appreciated. Thanks. This is the code in the class library: Option Strict On Option Explicit On
6
9001
by: John Kotuby | last post by:
Hi all, I am simply trying to include the Option Explicit declaration at the top of an ASP page and am getting an error: Error Type: Microsoft VBScript compilation (0x800A0400) Expected statement /transferkey.asp, line 2
4
3774
by: Neo | last post by:
I found on error resume next doesn't work in for each... e.g. on error resume next for each x in y 'do stuff next if you have an error in for each loop, it falls in infinite loop... it doesn't move to next element... this sad thing but, it's indication that we must move to try catch instead of on error.
1
2139
by: Jimmbo | last post by:
I get an option explicit error saying it does not appear as the first line whenever I use it with utf-8 charset encoding on my Sun Cobalt server running Chillisoft on Linux. The error does not occur if the charset declaration in the metatag is 8859-1 but this causes spurious characters such as capital A with a circle over it to appear before the "£" symbol when newsfeeds are paced on the 8859-1 page. Not very professional! These was a...
0
11588
by: Lysander | last post by:
Thought I would give something back with a few articles. This article is a bit of code to add error handling. When I have time, I want to write articles on multilingual databases, and Access Security, but I'll start with something short and simple This code was written in Access 2003 but should be valid in Access 2000 By default, when you start a new module, either in a form or report, or a global module, Access does not declare Option...
10
3643
by: =?Utf-8?B?cmFjZTRzcGFjZQ==?= | last post by:
Hi, IIS is not displaying run time errors - the various debugging options (Enable Server Side Debugging, Send Errors to Browser) have been set to true in the IIS console. No Errors are sent to browser and the script stops running at the error. This occurs for instance with an Option Explicit error - ie a non dimensioned variable is referenced in code with Option Explicit set. <%@ Language=VBScript %>
0
9160
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8897
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8862
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7729
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6521
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4370
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3050
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.