473,670 Members | 2,336 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

OPTION EXPLICIT

Have you encountered "OPTION EXPLICIT" not working in a
ASP program?

- Windows 2000 Server
- IIS 5.0
- Active Server Pages (VBScript)

We had a program that had "OPTION EXPLICIT" in the first
line. After a short processing, RESPONSE.REDIRE CT
redirects the user to another server. The program had a
bunch of variables that weren't declared, but were used in
the logic before RESPONSE.REDIRE CT.

The ASP program never gave an error message for the
undeclared variables except for one user (in the LIVE
version) who logged the problem recently and we came to
know about it. The program passed
through "developmen t", "staging" and then went "LIVE" and
had been "LIVE" for a few months.

How could this have happened?

Jul 19 '05 #1
1 2096
First of, show us some sample code.

Second, did the other users get ANY error at all, if not something that
stated "Variable not declared" specifically? If so, they may have their
"Show friendly errors" turned on in their browsers.

--
Manohar Kamath
Editor, .netBooks
www.dotnetbooks.com
"Sundar" <su*****@drone. com> wrote in message
news:08******** *************** *****@phx.gbl.. .
Have you encountered "OPTION EXPLICIT" not working in a
ASP program?

- Windows 2000 Server
- IIS 5.0
- Active Server Pages (VBScript)

We had a program that had "OPTION EXPLICIT" in the first
line. After a short processing, RESPONSE.REDIRE CT
redirects the user to another server. The program had a
bunch of variables that weren't declared, but were used in
the logic before RESPONSE.REDIRE CT.

The ASP program never gave an error message for the
undeclared variables except for one user (in the LIVE
version) who logged the problem recently and we came to
know about it. The program passed
through "developmen t", "staging" and then went "LIVE" and
had been "LIVE" for a few months.

How could this have happened?

Jul 19 '05 #2

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

Similar topics

8
12234
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. ...
1
2513
by: Robert Mark Bram | last post by:
Hi All! I have the following in a vb script: option explicit Response.Expires = -1 Server.ScriptTimeout = 600 The script gets imported in the following way: <script language="VBscript" runat=server src="lib/upload/aspUpload.asp">
7
3386
by: Mats | last post by:
Option Explicit does not work anymore.(?) If you put <%option explicit%> at the top of your pages (direktly after the language declaration) you should get an error for each undeclared variable. This does not happen, but undeclare variables lead to some odd results. Error somewhere or has IIS changfed its behavior? "Testbed" Win XP Pro SP2
12
2073
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
5
2027
by: ken | last post by:
hi All What does this command dot Option Explicit
6
1570
by: Brett | last post by:
I find there is more casting required in C# than VB.NET. If Option Strict/Explicit is turned on, will this basically create the same environment as C# - uppercase, more casting required, must build event handlers? Thanks, Brett
9
2326
by: YYZ | last post by:
After reading many messages in this group, it seems that the preferred setting for this is ON. Okay, I did that in my project (first with ..Net -- long time VB6 developer) and now a bunch of problems have cropped up. Most are easy to solve with using an explicit type cast cType(whatever, whatever type), but some aren't. Situation 1: I've got code that tries to get the itemkey of the selected item in a combobox....
6
8999
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
0
1328
by: Michael Jenck | last post by:
Hi All, I have been playing with the codedom and can't get it to output for option compare Binary with a CodeCompileUnit. I have searched the web and Don't now if it's possible. If it's not possible I just go with CodeSnippetCompileUnit Please email me a copy at: programmer @ jenck . net (remove the extra spaces)
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
8471
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8386
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8903
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...
0
8815
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8592
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
8661
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
5686
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
4213
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...
2
1795
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.